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
Fix span-metrics' subprocessors bug #3612
Conversation
…unning multiple tenants
How difficult is it to construct a test that reproes and then confirm this fixes it? |
I think it's feasible. I'll build one 👍 |
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.
does it make more sense to break the shared memory here:
https://github.com/grafana/tempo/blob/main/modules/generator/config.go#L66
where we copy the config?
Co-authored-by: Joe Elliott <joe.elliott@grafana.com>
Yes, but we only need the copy if there are changes to the subprocessors. What you suggests is more consistent, but also creates more allocations 🤷 |
This is just a few more allocations every couple minutes when it refreshes user overrides? That should be fine. I'd definitely lean towards code clarity over performance in this case. |
Changed 👍 |
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 like a simple test failure, but i'm good on this approach
* Fix span-metrics' subprocessors bug that applied wrong configs when running multiple tenants * Add test * Fix race condition * Update CHANGELOG.md Co-authored-by: Joe Elliott <joe.elliott@grafana.com> * Copy when copying the config * Fix bug --------- Co-authored-by: Joe Elliott <joe.elliott@grafana.com>
What this PR does:
Fixes a bug in which a shared map in the metrics-generator override config was not properly copied to avoid modifying the config of other tenants.
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]