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
Azure Functions support in-host and isolated modes, where user code runs in the same (as runtime) or a different process.
When users choose isolated mode, host reacts to triggers and then invokes worker process where user code runs. Host knows much more about trigger and can instrument this call properly.
FaaS conventions should suggest if instrumentations should expose some internal details on how they work:
should both host and worker spans be created? Which kind should worker spans have?
should call from host to worker be instrumented?
if worker call is not instrumented and should be hidden from user altogether, how to do it mechanically in OpenTelemtery
which attributes should be set on which span?
Here're possible approaches:
Option 1: transparent host-worker
Trigger span (on host) - server/consumer kind
Call to worker (client span)
Incoming on worker (server span)
Option 2: call to worker process is not traced as if things happen in the same process
Trigger span (on host) - server/consumer span
Incoming on worker (internal span)
Option 3: opaque communication (not possible today):
Trigger span (on host) - server/consumer span
call to worker propagates context and makes it ambient without starting new span
lmolkova
changed the title
FaaS: provide span recommendations for multiple layers of instrumentation
FaaS: provide span structure recommendations for multiple layers of instrumentation
Feb 15, 2023
I think a main problem here could be that the "Incoming on worker" span might extract a parent in an application-specific way, then, similar to messaging scenarios, you could have the application-level "sender" or "client" that you might want to use as parent and the technical caller (e.g. host span).
Additionally, I think some cloud providers already create spans for internals but only expose them with their own tracing solutions.
Azure Functions support in-host and isolated modes, where user code runs in the same (as runtime) or a different process.
When users choose isolated mode, host reacts to triggers and then invokes worker process where user code runs. Host knows much more about trigger and can instrument this call properly.
FaaS conventions should suggest if instrumentations should expose some internal details on how they work:
Here're possible approaches:
Option 1: transparent host-worker
Option 2: call to worker process is not traced as if things happen in the same process
Option 3: opaque communication (not possible today):
Related: Azure/azure-functions-dotnet-worker#1307
Afaik AWS lambda creates multiple spans today and it'd be great to define a common approach everyone can follow.
The text was updated successfully, but these errors were encountered: