newrelic-experimental / gha-new-relic-exporter

18 stars 14 forks source link

Datetime fields are being ingested as strings #13

Closed AngellusMortis closed 1 year ago

AngellusMortis commented 1 year ago

It looks like the datetime fields for the Spans (Completed At, Created At, Started At) are all being ingested as ISO strings and not rendering or being treated as datetime objects (you cannot do datetime NRQL operations on them).

Example would be doing started at - created at to generate an average queued time for a job.

I cannot find the docs on this, but I am fairly certain it is because New Relic is expecting UTC Epoch Timestamps instead of ISO Strings.

Example query:

image

dpacheconr commented 1 year ago

@AngellusMortis the attributes are all parsed and injected as strings so that is expected. I have added new attributes, now in the latest version you have your iso strings as well as the epoc timestamps, these append _ms to the attribute name, this way ensures backward compatibility