I am using OpenTelemetry, and trying to add a custom attribute to the current Span, and I can see the attribute (user.name, user.role) is showing as part of the trace:
// This is a sample trace coming from console exporter
Activity.TraceId: 1be70cf887cbde79d34d55e79642a9ee
Activity.SpanId: 4a40500a30985ff2
// Yada yada
Activity.Tags:
net.host.name: localhost
net.host.port: 7253
// The next 2 are my custom attributes
user.name: Ahamat, Farid
user.role: Guest, Officer
http.status_code: 200
Resource associated with Activity:
// Yada yada
But I could not find out how to see this custom attribute in Azure App Insight. Anybody knows?
It must be stressed here that I'm using OpenTelemetry. I'm NOT using AppInsight SDK.
using Azure Application Insight. Custom attribute and Querying custom data in Application Insights
Code taken from reference MSDOC
Here is way i added custom attributes .
requests