Open zhiyuanliang-ms opened 2 months ago
@zhiyuanliang-ms you should be able to achieve the same thing using Span attributes like you mentioned, Application Insights v3 was created for easy migration to OpenTelemetry for simple scenarios, in this case I recommend to take OpenTelemetry approach, logs will not include the attributes and you will need to add them using the LogRecord attributes as well.
@zhiyuanliang-ms you should be able to achieve the same thing using Span attributes like you mentioned, Application Insights v3 was created for easy migration to OpenTelemetry for simple scenarios, in this case I recommend to take OpenTelemetry approach, logs will not include the attributes and you will need to add them using the LogRecord attributes as well.
I have same problem as reporter. Could you, please, elaborate more how to use OpenTelemetry approach? Do I have to entirely ditch out AI v3 and replace it with Azure Monitor OT library(-ies)?
Hence, I find it difficult to master AI v3, when quite a few methods are still callable, but they are actually doing nothing, and no single error or warning thrown. ;-/
In v2, the below pattern works well for me:
The correlation context is per-request-scoped, I used correlationContext.customProperties to store some information which I want to be tagged to all telemetry emitted during the request. This is very helpful if I want to tag something into the request telemetry automatically emitted by app insights.
But in v3, CorrelationContext's custom properties are stubbed out source code It is impossible for me to achieve the same thing. Or should I use span.attribute instead?