Custom Event Structure

Hello, I’m sending Custom Events via New Relic API
https://insights-collector.newrelic.com/v1/accounts/{accountId}/events

In the first call of API, I’ve sended the JSON like this (ignore horaExecucao timestamp)

[{
“eventType”: “OSTimer”,
“duration”: 10,
“appName”: “Dashboard”,
“nomeTimer”: “Timer123”,
“horaExecucao”: 1597663740,
“nomeModulo”: “Testing”
}]

But now, I need to use the same “Custom Event” to store error messages and stack from my application, then I send a JSON like this

[{
“eventType”: “OSTimer”,
“duration”: 10,
“appName”: “Dashboard Error”,
“nomeTimer”: “TimerError”,
“horaExecucao”: 1597663741,
“nomeModulo”: “Testing Error”,
“mensagemErro”: “Testing Error”,
“stackTrace”: “Testing Error”
}]

In both cases the API response has success

{
“success”: true,
“uuid”: “*****”
}

But when I try to find a record of “OSTimer” Custom Event with NRQL in https://insights.newrelic.com/ the service can’t find any records with theses attributes.

My question is, can I change the Custom Event structure with this one? I need to create a new Custom Event? What can I do?

Hey @saulo.goncalves

Can you run:

SELECT * FROM NrIntegrationError SINCE 1 WEEK AGO

That will show you if there were any issues parsing your custom data.

1 Like

I run this NRQL, but “No Events Found” returned

Interesting @saulo.goncalves

I’d like to look more into the API call you are sending to post that data to New Relic… Could you send me a direct message with full details of the API call?

Hi @saulo.goncalves,

I was curious so I took a look at your account. Was the example you provided meant to be an exact representation of an event or just an example of the data structure expected? I ask because I found quite a bit of data with eventType OSTIMER in the application with the attributes mensagemErro and stackTrace.

The event type values will be case sensitive, so I wonder if this is something as simple as you querying for OSTimer when the event data we are receiving is for OSTIMER.