question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

opentracing can not be disabled with runtime config.

See original GitHub issue

Describe the bug Setting the property -Dquarkus.jaeger.enabled=false when executing the jar produced by running [my-package]-runner.jar, or via native-image, does not disable jaeger.

Expected behavior jaeger is disabled

Actual behavior The value contained with application.properties is used.

To Reproduce create a quarkus project add the opentracing extension build the executable jar or native image start with -Dquarkus.jaeger.enabled=false observe that the tracer is created and proceeds with tracing

Environment (please complete the following information):

  • Output of uname -a or ver: Darwin USMACEA013SSCOT 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64
  • Output of java -version: openjdk version “11.0.3” 2019-04-16 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.3+7) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.3+7, mixed mode, sharing)
  • GraalVM version (if different from Java):
  • Quarkus version or git rev: 1.0.0.CR1

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:16 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
dmlloydcommented, Nov 15, 2019

@dmlloyd I was afraid that you answer this …

Regarding #5387 I’m not comfortable with changing RUN_TIME to BUILD_TIME config even if it fixes the bug as your fix changes the intent of the developer. I understand that you cannot make it works as expected easily, maybe you should open followup issue for the extension maintainer to have a look and, if possible, make it works as intended (so at runtime).

Unfortunately it’s going to start being an error to access run time config from a build step (unless it’s just to proxy the object in to a recorder). If you do want to fix it before #5387 is merged, I understand.

We also use this construct heavily inside the security extension to be able to switch implementation from JDBC/OAuth2/Properties at runtime … we thought … as it is mainly used to switch between dev mode and prod mode we didn’t detect that it was an error 😦. So there should be a lot more issues like this when we think that something is configurable at runtime but it is only configurable at build time and devmode/testmode …

We always should have had a strict check for this, however we also wanted to be able to send run time config objects in to recorders so they need to be proxied to do that.

I think we should instead support injecting run time config objects directly into recorders, and then completely disallow usage of run time config objects in build steps. In fact I’ll file an issue to that effect.

1reaction
dmlloydcommented, Nov 14, 2019

Right it only appears to work, it doesn’t actually work. If you change the flag at run time it has no effect. My PR #5387 simply formalizes the existing, actual behavior by marking this property as a build time property.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable opentracing globally - java - Stack Overflow
Does opentacing/Jaeger expose any config or api or any other mechanism to disable it globally? Which mechanism are you using to enable/disable ......
Read more >
Using OpenTracing - Quarkus
By default, when quarkus.datasource.jdbc.tracing is true, tracing is enabled at runtime but you can explicitly disable it by setting the following property:.
Read more >
quarkus.jaeger.enabled cannot be changed at runtime
Build time property cannot be changed at runtime: - quarkus.jaeger.enabled was 'false' at build time and is now 'true'.
Read more >
Ruby Configuration - Configuring the Instana gem - IBM
The entire gem can be disabled at runtime by setting an environment variable for your application:
Read more >
Manual Instrumentation | OpenTelemetry
The SDK configuration must be provided by Applications which should also depend ... If this is not possible for some reason, you can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found