-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
exporter/signalfx: Add translation rule to drop dimensions #2660
exporter/signalfx: Add translation rule to drop dimensions #2660
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2660 +/- ##
=======================================
Coverage 91.41% 91.42%
=======================================
Files 435 435
Lines 21619 21655 +36
=======================================
+ Hits 19763 19798 +35
Misses 1390 1390
- Partials 466 467 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
0686a39
to
3463eb0
Compare
Add `drop_dimension` translation rule. Below are the various ways the rule can be configured ```yaml - action: drop_dimensions metric_names: k8s.pod.phase: true without_dimension_pairs: dim_key1: dim_key2: [dim_val1, dim_val2] - action: drop_dimensions without_dimension_pairs: dim_key1: - action: drop_dimensions metric_name: /^k8s\..*/ without_dimension_pairs: dim_key: [dim_value] ``` Also, a `drop_dimension` rule has been added to the default list of translations. The rule drops `opencensus.resourcetype` dimension from metrics generated by receivers written using OC data structures. This rule can be removed once the `k8s_cluster` and `kubeletstats` receivers have been refactored to use `pdata.Metrics`. Right now these dimensions are added as a result of the conversion [here](https://github.com/open-telemetry/opentelemetry-collector/blob/v0.22.0/translator/internaldata/oc_to_resource.go#L128). Dropping these dimensions will ensure MTSes aren't broken when the receivers are refactored to use `pdata.Metrics` and this resource type dimension will cease to exist.
3463eb0
to
bf6b9cc
Compare
607e235
to
a8583f7
Compare
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.
LGTM
* exporter/signalfx: Add translation rule to drop dimensions Add `drop_dimension` translation rule. Below are the various ways the rule can be configured ```yaml - action: drop_dimensions metric_names: k8s.pod.phase: true without_dimension_pairs: dim_key1: dim_key2: [dim_val1, dim_val2] - action: drop_dimensions without_dimension_pairs: dim_key1: - action: drop_dimensions metric_name: /^k8s\..*/ without_dimension_pairs: dim_key: [dim_value] ``` Also, a `drop_dimension` rule has been added to the default list of translations. The rule drops `opencensus.resourcetype` dimension from metrics generated by receivers written using OC data structures. This rule can be removed once the `k8s_cluster` and `kubeletstats` receivers have been refactored to use `pdata.Metrics`. Right now these dimensions are added as a result of the conversion [here](https://github.com/open-telemetry/opentelemetry-collector/blob/v0.22.0/translator/internaldata/oc_to_resource.go#L128). Dropping these dimensions will ensure MTSes aren't broken when the receivers are refactored to use `pdata.Metrics` and this resource type dimension will cease to exist. * Address feedback
Description: Add
drop_dimension
translation rule. Below are the various ways therule can be configured
Also, a
drop_dimension
rule has been added to the default list of translations.The rule drops
opencensus.resourcetype
dimension from metrics generated by receivers writtenusing OC data structures. This rule can be removed once the
k8s_cluster
andkubeletstats
receivers have been refactored to use
pdata.Metrics
. Right now these dimensions are added as aresult of the conversion here.
Dropping these dimensions will ensure MTSes aren't broken when the receivers are refactored
to use
pdata.Metrics
and this resource type dimension will cease to exist.Testing: Added tests
Documentation: Added inline comments.