Open king-11 opened 6 days ago
Thanks for the feedback, we’ll investigate asap.
@king-11
SpanKind
maps to itemType
not type
field in AppInsights. SpanKind.Cient
maps to dependency
type telemetry and SpanKind.Server
maps to requests
telemetry.
@lzchen but in the end to end transaction history it's being shown as N/A and not dependency
The reason you are getting "N/A" for the TYPE field is because application insights expects manually created spans (spans that are created using start_as_current_span) to be of type "InProc", which is the default if you do not set a span kind. ApplicationInsights only expects SpanKind.Client
spans created automatically from instrumentations.
tracer = get_tracer(__name__)
@tracer.start_as_current_span(name="update_inference_run")
def update_inference_run():
print("hello world")
We do not recommend setting the spankind manually, as this is an unsupported scenario for our SDK.
What would it take to support this particular scenario, I can try implementing it if it makes sense to have this feature?
My specific use case is that am familiar that the provided function makes multiple call to Azure SQL which are shown as dependency but then the overall function being a single span can be declared as type Client
.
My specific use case is that am familiar that the provided function makes multiple call to Azure SQL which are shown as dependency but then the overall function being a single span can be declared as type Client.
I am not fully understanding the use case here. InProc
spans are exported as dependencies
type telemetry as well. If the ask is to be able to manually modify the data.type
field to a specific value, this scenario is not supported.
If you would like to group together your telemetry, there are a lot of other ways you can achieve this, most nobly using span attibutes
Hi @king-11. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.
Describe the bug setting the
kind
of span toSpanKind.CLIENT
results in it being shown as of typeN/A
in app insights dependency table and end-to-end transaction detailTo Reproduce Create a span and set the kind as client.
Expected behavior Client kind should have a proper type instead of being N/A
Screenshots![image](https://github.com/Azure/azure-sdk-for-python/assets/52061363/8556bf45-590b-41e4-9c9d-7636db55e4c7)