51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

Java opentelemetry agent 在运行时启用/禁用

英文:

Java opentelemetry agent enable/disable at run time

问题 {#heading}

如何在运行时启用和禁用使用 otel Java 代理完成的 Java 自动仪器,以避免在出现问题时重新部署服务。有关如何执行此操作的任何想法吗?

如果我们有一种访问和修改 otel 代理使用的跟踪器的方法,我们也可以这样做。

在互联网上找不到相关信息。 英文:

what to enable and disable java auto instrumentation done using otel java agent at runtime to avoid redeployment of service in case of issues. Any idea on how we can do this?

we can also do this if we have some way to access and modify tracer used by otel agent.

found nothing on internet

答案1 {#1}

得分: 2

英文:

You can disable the agent entirely with OTEL_JAVAAGENT_ENABLED=false.

Or you can have the javaagent install instrumentation, but disable the OpenTelemetry SDK with OTEL_SDK_DISABLED.

Or you can suppress specific instrumentation with OTEL_INSTRUMENTATION_[NAME]_ENABLED=false.


赞(2)
未经允许不得转载:工具盒子 » Java opentelemetry agent 在运行时启用/禁用