Allow toggling of latency/count metrics for metrics-generator#2070
Allow toggling of latency/count metrics for metrics-generator#2070mapno merged 6 commits intografana:mainfrom
Conversation
0d0d535 to
c8f3fdd
Compare
mapno
left a comment
There was a problem hiding this comment.
I like the approach. Left a few comments.
|
@zalegrala @mapno ready for another look, I've switched to using a stable key space for subprocessors with the iota pattern and added support for the size metric |
mapno
left a comment
There was a problem hiding this comment.
Do you think this PR could be simplified if it used booleans (eg. export_count, export_latency and export_size) instead of the subprocessors approach? The current approach leaks much of the logic to instance.updateProcessors, and I think it could be mostly kept to the processor instead.
I like it the way it is but I can change it to whatever your team wants as I would like the feature. |
|
@mapno FYI in order to rectify your preferred approach with the strategy laid out by Joe in the issue itself: If the idea is to indicate processor in the |
|
Apologies, this fell through the cracks and I didn't see a notification until #2013 (comment). I'm sorry.
Don't you think we can move much of the logic in https://github.com/grafana/tempo/pull/2070/files#diff-2b2bf6091e8c6446ffe339e21fd2f917d4ba0c172a76a226153f53121181b202R127-R171 to the processor? The instance can just pass all the processors named Anyway, I don't block this much longer after not replaying so long. |
282e151 to
67d5ff2
Compare
|
@mapno I've rebased |
|
@mapno Sorry, is that last comment supposed to mean an approval is imminent? That's why I said I rebased 😆 |
|
Sorry, I wasn't clear. I was hoping we could move much of the logic in https://github.com/grafana/tempo/pull/2070/files#diff-2b2bf6091e8c6446ffe339e21fd2f917d4ba0c172a76a226153f53121181b202R127-R171 to the processor. Spanmetrics can take the processors that are enabled and work out which subprocessors need to be running. Nonetheless, I don't want to block this further if you're not convinced that approach is any better. Let me know and we can see to approving and merging. |
|
@mapno As I said above, you will still need logic in |
|
I was away for a few days, I'm ok to merge. Can you solve the conflict? Thanks |
Introduce concept of subprocessor to spanmetrics config, use specific override values to determine which subprocessors are enabled, and use that determination to yield latency/count metrics
f2bb7e6 to
3ff30a9
Compare
Signed-off-by: AlexDHoffer <alexdchoffer@gmail.com>
3ff30a9 to
cdfc440
Compare
|
@mapno Rebased, thanks |
|
Merging, thanks for the patience. |
What this PR does:
Allows user to toggle off latency and count metrics in the metrics-generator. It does this by introducing the concept of a subprocessor. The two current subprocessors are
span-metrics-countandspan-metrics-latency. These subprocessors are toggled on by default, i.e. when "span-metrics" is indicated in the overrides. A user can choose thespan-metrics-countsubprocessor by indicating it in the overrides, likewise with the-latencyone. If a subprocessor that doesn't exist is indicated, it won't be parsed by subprocessor logic but instead will be flagged as a bad processor. Under the hood indicating thespan-metricsprocessor alone enables both subprocessors.Which issue(s) this PR fixes:
Fixes #2013
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]Happy to update documentation if this particular approach for this problem is accepted by maintainers