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/prometheusremotewriteexporter] Do not modify attributes Map in prometheusRW #9736

Conversation

kwapik
Copy link
Contributor

@kwapik kwapik commented May 4, 2022

Description:
Modifying data in the prometheus remote write causes a race when more
than one exporters is accessing data.
To avoid this, all operations are done on cloned data.

Link to tracking Issue: #9727

Testing:
I have executed the reproduction steps described in the bug report. With the fix the panic is not occurring anymore.

Documentation:
Added inline comment about the change as this is not self-explanatory.

Modifying data in the prometheus remote write causes a race when more
than one exporters is accessing data.
To avoid this, all operations are done on cloned data.
@kwapik kwapik requested a review from a team as a code owner May 4, 2022 17:24
@kwapik kwapik requested a review from dashpole May 4, 2022 17:24
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 4, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: kwapik / name: Krzysztof Kwapisiewicz (a34c665)

@kwapik
Copy link
Contributor Author

kwapik commented May 4, 2022

Will sort out the CLA stuff soon.

@codeboten codeboten merged commit 910f9c4 into open-telemetry:main May 5, 2022
@kwapik kwapik deleted the fix_prometheus_remote_write_exporter_race branch May 5, 2022 15:08
djaglowski pushed a commit to djaglowski/opentelemetry-collector-contrib that referenced this pull request May 10, 2022
… in prometheusRW (open-telemetry#9736)

* Do not modify attributes Map in prometheusRW

Modifying data in the prometheus remote write causes a race when more
than one exporters is accessing data.
To avoid this, all operations are done on cloned data.

* Update CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants