-
Notifications
You must be signed in to change notification settings - Fork 1.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
chore(metrics): Switch from literals at emit! to span context #4181
Conversation
Signed-off-by: MOZGIII <mike-n@narod.ru>
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.
Very nice!
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.
I have a suspicion that
events_processed
will get mixed up in an unwanted way at the components that are implemented with nesting (i.e. asource
that incorporates atransform
, both incrementevents_processed
). CC @lukesteensen
I was hoping that this would be avoided by only setting the span data at the topology level, not every time any of the component structs are instantiated, which it seems like we're doing. Does that sound right? We should definitely verify that the data is still accurate before merging.
@lukesteensen yes, that's correct. We only set the span at the topology level, but the span remains entered for the whole runtime of the said component (note the Consider a Before, processing one event would result in counter increments for:
After:
( We bump the value twice either way - which is probably an unwanted outcome, either way. However, in this new way, the exact same metric (same name, same labels) is bumped, and two increments will be indistinguishable. Before, we could, at least, filter them out. I think we need to something like wrap all the nested transforms with a span that would add an extra label, allowing us (and users) to differentiate between the nested and topmost transforms. This problem is kind of unique to transforms, because they can be re-used as an implementation detail of sinks and sources. |
Yes, let's merge this. It looks like if this causes issues due the points outlined above it is expected. We can deal with this later, once it lands and we see the effects. I'll resolve the conflicts and merge this |
Sounds good, I opened #4454 to represent the issue. |
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
For the record, I suggested a fix for this as part of #4427 (emit these events from a topology-level wrapper rather in inside of each component). |
…dotdev#4181) * Populate metrics from spans to match the keys at emit!s Signed-off-by: MOZGIII <mike-n@narod.ru> * Remove component info literals from emit!s Signed-off-by: MOZGIII <mike-n@narod.ru> * Update the internal metrics invocations after the merge Signed-off-by: MOZGIII <mike-n@narod.ru> Signed-off-by: Brian Menges <brian.menges@anaplan.com>
A correction to #3888 after #3888 (comment)
I have a suspicion that
events_processed
will get mixed up in an unwanted way at the components that are implemented with nesting (i.e. asource
that incorporates atransform
, both incrementevents_processed
). CC @lukesteensen