-
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
exporter/signalfx: Correctly convert dimensions on metadata updates #2552
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2552 +/- ##
==========================================
+ Coverage 91.32% 91.34% +0.02%
==========================================
Files 429 429
Lines 21456 21457 +1
==========================================
+ Hits 19594 19600 +6
+ Misses 1394 1392 -2
+ Partials 468 465 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
ad46e69
to
8d37b0a
Compare
@@ -116,7 +108,7 @@ func getPropertiesAndTags(kmu metadata.MetadataUpdate) (map[string]*string, map[ | |||
func (dc *DimensionClient) PushMetadata(metadata []*metadata.MetadataUpdate) error { | |||
var errs []error | |||
for _, m := range metadata { | |||
dimensionUpdate := getDimensionUpdateFromMetadata(*m, dc.metricTranslator) | |||
dimensionUpdate := getDimensionUpdateFromMetadata(*m, dc.metricsConverter) |
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.
Is this really not tested with a mock client or backend?
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.
It is, there are tests in exporter_test
but codev does not account for tests outside the package
e8ea51c
to
8dd99ff
Compare
Please rebase |
8dd99ff
to
9235619
Compare
…entions (#2552) Signed-off-by: Bogdan Drutu <[email protected]>
Description: Correctly convert dimension values while making metadata updates. Currently, the exporter invokes
sanitizeDataPointDimensions
on all translated datapoints which cleans up non-alphanumeric dimension keys. This is not being done for dimensions in metadata updates. This PR ensures that dimensions are correctly translated and sanitized even in metadata updates.Testing: Added tests.