简体   繁体   English

AzureMonitorTraceExporter 和 AzureMonitorSpanExporter 有什么区别?

[英]What is the difference between AzureMonitorTraceExporter and AzureMonitorSpanExporter?

from azure.core.settings import settings
from azure.core.tracing.ext.opentelemetry_span import OpenTelemetrySpan
settings.tracing_implementation = OpenTelemetrySpan

from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor

I was trying to apply opentelemetry to monitor a Azure Function App.我试图应用 opentelemetry 来监控 Azure Function 应用程序。 And I found there are two ways to configure export: AzureMonitorTraceExporter and AzureMonitorSpanExporter.我发现有两种配置导出的方法:AzureMonitorTraceExporter 和 AzureMonitorSpanExporter。 What is the difference between them?它们之间有什么区别?

from  azure.monitor.opentelemetry.exporter  import  AzureMonitorTraceExporter
app_insights_key = os.getenv('APPINSIGHTS_INSTRUMENTATIONKEY_String')
exporter = AzureMonitorTraceExporter.from_connection_string(app_insights_key)

and

from azure_monitor import AzureMonitorSpanExporter
app_insights_key = os.getenv('APPINSIGHTS_INSTRUMENTATIONKEY')
exporter = AzureMonitorSpanExporter(instrumentation_key=app_insights_key)

And which way is better for a Azure Function App?对于 Azure Function App,哪种方式更好? Thanks.谢谢。

AzureMonitorSpanExporter is old one and not supported/developed now. AzureMonitorSpanExporter是旧的,现在不支持/开发。 It is moved fromhttps://github.com/microsoft/opentelemetry-azure-monitor-python to https://github.com/Azure/azure-sdk-for-python .它从https://github.com/microsoft/opentelemetry-azure-monitor-python移动到https://github.com/Azure/azure-sdk-for-python You should be using AzureMonitorTraceExporter .您应该使用AzureMonitorTraceExporter

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 machineType 和 mixedInstancesPolicy 有什么区别 - What is the difference between machineType and mixedInstancesPolicy getIdToken 和 getAppCheckToken 有什么区别? - What is difference between the getIdToken and getAppCheckToken? gcloud 和 gsutil 有什么区别? - What is the difference between gcloud and gsutil? GCP 云作曲家和工作流有什么区别? - What is the difference between GCP cloud composer and workflow? Uvicorn 和 Gunicorn+Uvicorn 有什么区别? - What is the difference between Uvicorn and Gunicorn+Uvicorn? AWS Amplify 中的 currentAuthenticatedUser() 和 currentUserPoolUser() 有什么区别? - what is difference between currentAuthenticatedUser() and currentUserPoolUser() in AWS Amplify? ApplicationInsights TrackEvent 和 ILogger LogInformation 有什么区别 - What is the difference between ApplicationInsights TrackEvent and ILogger LogInformation timestamp[ns] timestamp[s] 有什么区别? - What is difference between timestamp[ns] timestamp[s]? Cloud Build 和 Cloud Deploy 有什么区别? - What is the difference between Cloud Build and Cloud Deploy? Firebase - ref 和 child 有什么区别? - Firebase - What is the difference between ref and child?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM