vector icon indicating copy to clipboard operation
vector copied to clipboard

bug(new_relic sink): tags not sent with metrics, leading to unwanted aggregation/downsampling

Open lukasmrtvy opened this issue 2 years ago • 5 comments

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

NewRelic sink ( https://vector.dev/docs/reference/configuration/sinks/new_relic/ ) does not support .tags object, but instead of .tags, NR supports .attributes ( https://docs.newrelic.com/docs/data-apis/ingest-apis/metric-api/report-metrics-metric-api/ )

Remapping .tags to .attributes via VRL does not work.

Same metric from different sources ( where for example .tags.appname will be different ) shipped via the same Vector instance will be mixed in NR timeseries data. Querying metric based on .tags.appname metadata value would be impossible then.

Configuration

No response

Version

timberio/vector:0.22.2-debian image

Debug Output

No response

Example Data

No response

Additional Context

No response

References

No response

lukasmrtvy avatar Jun 29 '22 10:06 lukasmrtvy

Additionally, from taking a look at the new_relic sink, it appears that we don't send the metric type along, and that we don't handle distributions, either.

I'll open a separate ticket to track the lack of full metric support.

tobz avatar Aug 01 '22 14:08 tobz

Opened #13781 to track further improvements to the metrics support for the new_relic sink.

tobz avatar Aug 01 '22 14:08 tobz

@jszwedko I'm currently working on this issue, could you assign it to me?

asllop avatar Sep 15 '22 07:09 asllop

Thanks for the contribution @asllop!

spencergilbert avatar Sep 15 '22 13:09 spencergilbert

@tobz distribution metrics are not actually supported by the New Relic Metric API. Internally, New Relic can handle this type of metrics (https://docs.newrelic.com/docs/data-apis/understand-data/metric-data/metric-data-type/), but the API only allows injecting gauge, count and summary metrics (https://docs.newrelic.com/docs/data-apis/ingest-apis/metric-api/report-metrics-metric-api/#send-metric-data). And regarding count metrics, pleas check out this discussion.

asllop avatar Sep 16 '22 13:09 asllop