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
We're ensuring our SDK works well with OpenTelemetry. Our guidance in .net has been to use the AutoInstrumentation as much as you can and then add an attributes.extraField. In .net it's easy because the Activity is available to us anywhere.
In python, it's unclear to me if it's possible to add attributes to the "current" span without fully creating your own span in manual instrumentation. For example, I want to advice developers to do something like:
Hello! This is hopefully just a question.
We're ensuring our SDK works well with OpenTelemetry. Our guidance in
.net
has been to use the AutoInstrumentation as much as you can and then add anattributes.extraField
. In.net
it's easy because theActivity
is available to us anywhere.In python, it's unclear to me if it's possible to add attributes to the "current" span without fully creating your own span in manual instrumentation. For example, I want to advice developers to do something like:
(Example taken from https://opentelemetry.io/docs/languages/python/getting-started/#add-manual-instrumentation-to-automatic-instrumentation)
Existing code:
and add something like:
(currentSpan referring to the span created for the request by the auto instrumentation)
Is this possible? I don't think a processor works here because I need the request object- which isn't always available everywhere in some frameworks.
The text was updated successfully, but these errors were encountered: