加载中

支持性配置选项

dynamic config

设置代理(agent)的日志记录级别。

有效选项:CriticalErrorWarningInfoDebugTraceNoneNone 会关闭日志记录)。

重要提示

AddElasticApm() 扩展支持配置,正如在典型的 ASP.NET Core 应用程序中一样。您必须转而在 appsettings.jsonLogging 部分下设置内部 APM .NET Agent 记录器的 LogLevel。更多详细信息,包括示例配置文件,可在 ASP.NET Core 上的配置中找到。

环境变量名称 IConfiguration 或 Web.config 键
OTEL_LOG_LEVEL ElasticApm:LogLevel
默认值 类型
错误 String
注意

虽然带有 OTEL_ 前缀,但如果存在 OTEL_LOG_LEVEL,我们更倾向于使用它,因为这与 EDOT .NET 和 OpenTelemetry SDK 的配置保持一致,从而简化了迁移。

© . This website operates independently and is not affiliated with or endorsed by Elasticsearch B.V. All brand names, logos, and trademarks are the property of their respective owners.