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

[exporter/datadogexporter] Take hostname into account for cache #6223

Merged
merged 3 commits into from
Dec 2, 2021

Conversation

mx-psi
Copy link
Member

@mx-psi mx-psi commented Nov 10, 2021

Description:

Fixes a bug where cumulative metrics (histograms, monotonic sums and some summary fields) were not being transformed correctly into deltas in multi-Collector setups, since the hostname was not used as part of the cache key for old points.
This could cause incorrect values on metrics. This issue did not affect users with the resource_attributes_as_tags flag enabled (not the default, but seems to be common) or where the tags+host were otherwise sufficient to identify a metric.

To fix this we include the hostname into the cache key, which has been refactored into a metricsDimensions struct.

Workaround for bug in older versions: Set resource_attributes_as_tags to true.

Link to tracking Issue: n/a, found when working on something else

Testing: Added unit tests; will test in end-to-end environment.

@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Nov 18, 2021
@mx-psi mx-psi removed the Stale label Nov 18, 2021
@mx-psi mx-psi force-pushed the mx-psi/metric-dimensions branch from 92461c0 to be5d8de Compare November 19, 2021 10:53
@mx-psi mx-psi marked this pull request as ready for review November 23, 2021 11:31
@mx-psi mx-psi requested review from a team and codeboten November 23, 2021 11:31
@mx-psi mx-psi requested a review from KSerrania November 23, 2021 11:32
@mx-psi mx-psi added the ready to merge Code review completed; ready to merge by maintainers label Nov 25, 2021
@bogdandrutu bogdandrutu merged commit 8769a9f into open-telemetry:main Dec 2, 2021
jamesmoessis pushed a commit to atlassian-forks/opentelemetry-collector-contrib that referenced this pull request Dec 8, 2021
…-telemetry#6223)

* [exporter/datadogexporter] Take hostname into account for cache

* Defensively copy tags on AddTags

* [exporter/datadogexporter] Fix m.host and add test for this
povilasv referenced this pull request in coralogix/opentelemetry-collector-contrib Dec 19, 2022
…go prometheus exporter (#6223)

* add prometheus metric prefix and constant service attributes to otel-go prometheus exporter

* changelog

* add telemetry attributes as resource

* context and comments

* remove constant labels wrapper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants