-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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(gnmi) Refactor tag-only subs for complex keys (#11011) #11019
Conversation
6705723
to
1ae4057
Compare
So at this point, I think I have the basic backwards compatibility done. Will noodle on the right way to handle tag storing/application tomorrow. |
ee96b8a
to
de73fe0
Compare
Continuing to think on this. What I have currently works, but I'm unsure about the store Current store behavior:
To retrieve, we start at the root, and try to walk all our keys down as far as possible, picking up extra tags along the way. I'm not great with Golang, or computer science in general, so please feel free to recommend better approaches, up to including there already being a generic solution out there we can just import. Still need to add tests and docs. How should deprecation of |
5f92ecb
to
ab68050
Compare
Tests written. Testing has found another existing bug in handling elements with multiple keys:
returns metrics like I think the above is out of scope for this pull request, however, and wrote the new tests to reflect the current behavior |
ab68050
to
71e956c
Compare
71e956c
to
4fab120
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.
Before I dig into this a bit more, one of the guiding principles of Telegraf is ensuring we aren't breaking existing users. When I see the config format start to change it makes me wonder :) These two questions come to mind:
- Will existing configurations continue to work?
- Would this change the format of metrics that are generated?
Existing configurations are silently converted to the new configuration, with the caveat that old and new configuration methods cannot be used together: https://github.com/influxdata/telegraf/pull/11019/files#diff-8f015c9f22f0f8f4f8ee17b671e6d8f3ffa1871b86fc765a96e00d9d45ba0f39R507-R510 This code works for the majority use case (applying interface descriptions to other metrics). However, given the user config in #11007, I am going to have to think a bit more. An earlier attempt had a separate function to extract legacy tags -- I will may have to add it to this PR as well, but given the underlying bug we're looking to fix, I'm not sure those users were actually getting useable/correct data I am unsure if there is a mechanism for informing the end-user of this / an existing deprecation policy for telegraf -- would appreciate any pointers here.
I did not modify existing tests when adding this code, and they all still pass, so I do not believe so. |
@bewing thanks for this - can you resolve the conflict and we can land this? |
Rebased and pushed. Looks like I might have some linting to do? |
I'm happy to ignore for now, but if you want to put up a PR or update this one with the metrics section filed out it would be nice at some point. That section just describes the layout of the metric collected. |
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
Will put in a separate PR, as it should be a separate commit anyway. |
…ch seems to be lost on the way...
Required for all PRs:
resolves #11011
Re-work how to handle tag-only subscriptions to support more complex cases/lookups and improve concurrency