You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was thinking today about processes that are not triggered by external events. In many tracing scenarios, we have an external "initiator": a person clicking on some UI that makes a request, some API call, some message pushed to a queue, etc.
However, in some scenarios, we have recurring "activities" that are started via an in-process timer: i.e. the timer is the "trigger" in these cases.
Having said that, would it make sense/be possible to instrument something like the new PeriodicTimer class with OpenTelemetry tracing so that it would show a span around the actions triggered by the timer?
I know usually the timer itself will not know when the action "finished", only when it "started". But maybe in combination with the disposal functionality or some other mechanism, we could make something that automatically "starts" traces when timers are the trigger.
I wonder if a callback-based timer interface would make more sense for this instead of the current manually awaitable version. That would allow the callback logic to be wrapped in an activity.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I was thinking today about processes that are not triggered by external events. In many tracing scenarios, we have an external "initiator": a person clicking on some UI that makes a request, some API call, some message pushed to a queue, etc.
However, in some scenarios, we have recurring "activities" that are started via an in-process timer: i.e. the timer is the "trigger" in these cases.
Having said that, would it make sense/be possible to instrument something like the new
PeriodicTimer
class with OpenTelemetry tracing so that it would show a span around the actions triggered by the timer?I know usually the timer itself will not know when the action "finished", only when it "started". But maybe in combination with the disposal functionality or some other mechanism, we could make something that automatically "starts" traces when timers are the trigger.
I wonder if a callback-based timer interface would make more sense for this instead of the current manually awaitable version. That would allow the callback logic to be wrapped in an activity.
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions