Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: isSdkEnabled() mentioned in sdk-extensions/autoconfigure/README.md but it doesn't exist #4652

Closed
deejgregor opened this issue Jul 31, 2022 · 3 comments · Fixed by #4658
Labels
Bug Something isn't working

Comments

@deejgregor
Copy link
Contributor

Describe the bug
AutoConfiguredOpenTelemetrySdk#isSdkEnabled() is mentioned in sdk-extensions/autoconfigure/README.md but that method doesn't exist (and AFAICT, it never existed in main).

Steps to reproduce
git grep isSdkEnabled

What did you expect to see?
isSdkEnabled() in the README.md and in AutoConfiguredOpenTelemetrySdk.java.

What did you see instead?
It's only in the README.

$ git checkout main
Already on 'main'
Your branch is up to date with 'origin/main'.
$ git grep isSdkEnabled
sdk-extensions/autoconfigure/README.md:The OpenTelemetry SDK can be disabled entirely. If disabled, `AutoConfiguredOpenTelemetrySdk#isSdkEnabled()` will return `false`, and `GlobalOpenTelemetry` will be set to `OpenTelemetrySdk.builder().build()`.
$

What version and what artifacts are you using?
Artifacts: opentelemetry-sdk-extension-autoconfigure
Version: 1.16.0-alpha
How did you reference these artifacts?
Top-level pom.xml:

...
  <properties>
...
    <opentelemetryVersion>1.16.0</opentelemetryVersion>
...
  </properties>
...
  <dependencyManagement>
...
      <dependency>
        <groupId>io.opentelemetry</groupId>
        <artifactId>opentelemetry-sdk-extension-autoconfigure</artifactId> <!-- not included in opentelemetry-bom -->
        <version>${opentelemetryVersion}-alpha</version>
      </dependency>
...
  </dependencyManagement>
...

Tracing integration project pom.xml:

...
    <dependency>
      <groupId>io.opentelemetry</groupId>
      <artifactId>opentelemetry-sdk-extension-autoconfigure</artifactId>
    </dependency>
...

Environment

openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment Homebrew (build 11.0.15+0)
OpenJDK 64-Bit Server VM Homebrew (build 11.0.15+0, mixed mode)

Additional context
I don't just see this with pre-built JAR from Maven, I also see it in the source in git.

@deejgregor deejgregor added the Bug Something isn't working label Jul 31, 2022
@jack-berg
Copy link
Member

Ah good catch. That change in documentation came in this PR, and in one version there was a new isSdkEnabled() method added. It ultimately didn't make the cut but must have missed updating the docs accordingly.

Thanks for the report. Will fix.

@deejgregor
Copy link
Contributor Author

Ah good catch. That change in documentation came in this PR, and in one version there was a new isSdkEnabled() method added. It ultimately didn't make the cut but must have missed updating the docs accordingly.

It would be nice to have something like isSdkEnabled(), but oh well. I can compare against OpenTelemetry.noop() and get close enough. Thanks for the fix.

@jack-berg
Copy link
Member

Thanks for the feedback!

Part of the decision to remove isSdkEnabled was that it we'd be making a fairly big ergonomic change to the API to accommodate an experiment env var. There currently an effort to get the env var included in the spec, which may be enough to justify changing the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants