Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[new_relic sink] actually set the metric type in the metrics API model object #13903

Closed
Tracked by #13781
jszwedko opened this issue Aug 9, 2022 · 4 comments · Fixed by #18151
Closed
Tracked by #13781

[new_relic sink] actually set the metric type in the metrics API model object #13903

jszwedko opened this issue Aug 9, 2022 · 4 comments · Fixed by #18151
Labels
provider: new relic Anything `new relic` service provider related sink: new_relic Anything `new_relic` sink related type: bug A code related bug.

Comments

@jszwedko
Copy link
Member

jszwedko commented Aug 9, 2022

No description provided.

@jszwedko jszwedko changed the title actually set the metric type in the metrics API model object [new_relic sink] actually set the metric type in the metrics API model object Aug 9, 2022
@jszwedko jszwedko added provider: new relic Anything `new relic` service provider related sink: new_relic Anything `new_relic` sink related type: bug A code related bug. labels Aug 9, 2022
@asllop
Copy link
Contributor

asllop commented Sep 14, 2022

The models for count metrics are different in New Relic and Vector. While New Relic expects it to contain an interval.ms field, that is, the time during which the metric has been counted, there is no such field in Vector. Looks like for Vector, a count metric represents a single point in time, an event that makes a counter increment or reset. For New Relic, a count metric represents an accumulation of increments that happened during a time interval, and always resets to zero automatically after it is sent. The concepts are different, and thus, I don't think we can directly translate Vector count metrics to New Relic.

For more info on New Relic metric model:

https://docs.newrelic.com/docs/data-apis/understand-data/metric-data/metric-data-type/

EDIT:

Actually, because in Vector the count value keeps incrementing and contains the accumulated count (every metric sent contains the previous count value plus the new ones that happened since the last metric was sent), I think it is pretty much akin to the concept of gauge, and it's safe to just send Vector count metrics as New Relic gauge metrics. For New Relic, a gauge is just a value that changes over time, up and down. For Vector a count is a value that changes over time but only up (or zero).

@asllop
Copy link
Contributor

asllop commented Sep 14, 2022

@jszwedko please correct me if I'm wrong regarding how Vector count metrics work.

@jszwedko
Copy link
Member Author

Thanks @asllop ! I'm actually curious what @bruceg or @tobz thinks here since they are more familiar with our metrics data model.

@bruceg
Copy link
Member

bruceg commented Sep 16, 2022

We do have a metric normalizer layer for all metrics sinks that can convert any absolute metrics (including counters) into incremental values. We can easily setup this layer to convert counters to incremental values. For the interval, It sounds like storing the previous request time and emitting the difference between that and now may be sufficient, as that would be interval over which the counter has accumulated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider: new relic Anything `new relic` service provider related sink: new_relic Anything `new_relic` sink related type: bug A code related bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants