-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
chore: Use span fields as metrics labels #3888
Conversation
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
aad825f
to
7503b77
Compare
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
7503b77
to
95d857d
Compare
Signed-off-by: MOZGIII <mike-n@narod.ru>
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.
This overall looks good!
metrics-rs/metrics#87 has been merged, will switch the crate at |
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
I found out that the notation we're using at topology at Also, the code I have filters by |
I don't mind either way, but I would choose |
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 okay, though the title really underplays what is going on here as it looks like a significant rework of our internal metrics underlay.
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
…tion Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
Ended up using Did a test run - it works great in practice. I suggest interested parties take the final look. I'll probably merge this on Monday. |
Yeah, I'd prefer that we use |
@binarylogic I’d prefer that we don’t define the same field in two locations to eliminate the confusion with where they come from. So, I suggest removing the literals Not removing any would lead to metrics having two @lukesteensen what do you think? |
It's fine. You've got 2 approvals, let's merge. |
Yes, my assumption was that we'd remove the manual tags from the event definitions once we're able to derive them from the span data. This is especially important for events that are emitted from shared components, where we previously couldn't know the exact type statically. |
I'll create a follow-up PR to put this in order. |
* Update the metrics crate to 0.13.0-alpha Signed-off-by: MOZGIII <mike-n@narod.ru> * Enable capturing tracing spans as metric labels Signed-off-by: MOZGIII <mike-n@narod.ru> * Implement label filtering Signed-off-by: MOZGIII <mike-n@narod.ru> * Add a test for label injection Signed-off-by: MOZGIII <mike-n@narod.ru> * Add a workaround for disabled spans in tests Signed-off-by: MOZGIII <mike-n@narod.ru> * Switch to published crates Signed-off-by: MOZGIII <mike-n@narod.ru> * Fix clippy offences Signed-off-by: MOZGIII <mike-n@narod.ru> * Fix the autoformatting Signed-off-by: MOZGIII <mike-n@narod.ru> * Rename the ComponentNameFilter to VectorLabelFilter Signed-off-by: MOZGIII <mike-n@narod.ru> * Actually use the VectorLabelFilter for TracingContextLayer initialization Signed-off-by: MOZGIII <mike-n@narod.ru> * Adjust the actual spans and included label names Signed-off-by: MOZGIII <mike-n@narod.ru> * Use the highest span level to avoid being affected by the log levels Signed-off-by: MOZGIII <mike-n@narod.ru> * Correct the metrics initialization at k8s instrumenting state tests Signed-off-by: MOZGIII <mike-n@narod.ru> Signed-off-by: Brian Menges <brian.menges@anaplan.com>
Closes #2660
Commits are semantic, should be easy to follow along through history.