-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Statsd receiver]Add metric type as a label #2466
[Statsd receiver]Add metric type as a label #2466
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2466 +/- ##
==========================================
+ Coverage 90.91% 90.93% +0.01%
==========================================
Files 411 411
Lines 20467 20481 +14
==========================================
+ Hits 18608 18624 +16
+ Misses 1397 1396 -1
+ Partials 462 461 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, two points:
- Need to revise
Readme
. - It's better to explain a little bit more about the change in description so that Josh can have some background here.
- You can ask Anuraag to take a look and get some comments.
minor thing: I think label is the correct OT terminology not dimension? |
The description says the field is |
Thanks Wesley, updated the description and title. |
I wonder if this could be inferred in the exporter based on the type of OTLP data type that is used. Then, the statsd receiver would do the ordinary thing, and the EMF exporter can annotate the instrument type by inference. I think other metric exporters will gain enough information based on the OTLP type. The mapping is: OTLP Sum point: Statsd type "counter" Would that be sufficient? |
@jmacd we'd have to build statsd specific logic into our exporter which would look at each metric and then append this label. At least just from a software engineering standpoint, that feels wrong. The statsd specific logic of adding the right statsd metric type as a label seems best placed in the statsd receiver itself. |
Hi Josh, we have two reasons that we need to add these tags:
|
Confused about the CircleCI unit test, before I updated the read me, the all the checks were successful, but now the windows unit test for emf-exporter failed twice. Should I create an issue about that? |
I won't object. If you want these labels eventually it has to be configured somewhere, but I had to ask.
With both OTLP and the OC types there is a unit field that can carry the distinction between timing and histogram.
Great, let's fix that 😀 😀 😀 |
Re run unit test
Re-run integration test
* Add the metric type as a dimension for StatsD receiver * Update readme * Fix a typo * re-run test * Re-run test * Update statsd_parser.go Re run unit test * Re-run integration test Re-run integration test
Backgrounds:
One of our customer has a requirement to get a metric_type label. This label is same with the statsd data type.
Because this dimension is only required by one of our customer, we decide to add flag to enable this label in the config file.
Description:
1, Add a new label called metric_type for statsd receiver.
2, Add a new flag label for the config file of the statsd.
enable_metric_type
3, Add unit tests for the config when
enable_metric_type = true
Testing:
Unit test and local test.