Application Insights - 如何设置 OperationId
Application Insights - How to SET the OperationId
有没有办法 SET/Inform 从前端映射到 Application Insights 的 OperationID?也许我可以在特殊的 header 或其他东西中将所需的 operationID 发送到后端?
Application Insights 作为第一个 class 公民支持 W3C distributed tracing 标准。如果 http 请求中存在以下 headers,SDK 会自动负责在整个上下文中设置操作 ID。
- traceparent:携带调用的全局唯一操作ID和唯一标识。
- tracestate(可选,以备不时之需):携带 system-specific 跟踪上下文。
既然你提到你的后端是 asp.net 核心,从 Microsoft.ApplicationInsights.AspNetCore nuget version 2.8.0, no configuration is needed. For more details, refer https://docs.microsoft.com/en-us/azure/azure-monitor/app/correlation#enable-w3c-distributed-tracing-support-for-aspnet-core-apps
开始
有没有办法 SET/Inform 从前端映射到 Application Insights 的 OperationID?也许我可以在特殊的 header 或其他东西中将所需的 operationID 发送到后端?
Application Insights 作为第一个 class 公民支持 W3C distributed tracing 标准。如果 http 请求中存在以下 headers,SDK 会自动负责在整个上下文中设置操作 ID。
- traceparent:携带调用的全局唯一操作ID和唯一标识。
- tracestate(可选,以备不时之需):携带 system-specific 跟踪上下文。
既然你提到你的后端是 asp.net 核心,从 Microsoft.ApplicationInsights.AspNetCore nuget version 2.8.0, no configuration is needed. For more details, refer https://docs.microsoft.com/en-us/azure/azure-monitor/app/correlation#enable-w3c-distributed-tracing-support-for-aspnet-core-apps
开始