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

Tracer.startSpan, api.isInstrumentationSuppressed is not a function, example/tracer-web #2250

Closed
boningh opened this issue Jun 2, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@boningh
Copy link

boningh commented Jun 2, 2021

Please answer these questions before submitting a bug report.

What version of OpenTelemetry are you using?

opentelemetry-js

What version of Node are you using?

Tried with both 12 & 14, threw same error.

Please provide the code you used to setup the OpenTelemetry SDK

What did you do?

I cloned opentelemetry-js repo and follow the README under example/tracer-web, but error was threw after npm start, also the browser console complains about Tracer.startSpan, api.isInstrumentationSuppressed is not a function.

If possible, provide a recipe for reproducing the error.

What did you expect to see?

The screenshot shown in the README.

What did you see instead?

Error.

Additional context

Add any other context about the problem here.

@boningh boningh added the bug Something isn't working label Jun 2, 2021
@dyladan
Copy link
Member

dyladan commented Jun 3, 2021

Please include the versions of components you are using.

@Gio-Jimdo
Copy link

I can corroborate this experience with package versions:

  "dependencies": {
    "@opentelemetry/api": "0.20.0",
    "@opentelemetry/api-metrics": "0.19.0",
    "@opentelemetry/context-zone": "0.19.0",
    "@opentelemetry/core": "0.19.0",
    "@opentelemetry/exporter-collector": "0.19.0",
    "@opentelemetry/instrumentation": "0.19.0",
    "@opentelemetry/instrumentation-document-load": "0.16.0",
    "@opentelemetry/metrics": "0.19.0",
    "@opentelemetry/web": "0.19.0"
  }

@dyladan
Copy link
Member

dyladan commented Jun 3, 2021

API 0.20.0 will be compatible with the SDK components 0.20.0 when they are released later today. For now, SDK components should use API 1.0.0-rc.3.

For full context on why the API version was "downgraded" from 1.x to 0.x, take a look at open-telemetry/opentelemetry-js-api#74

@dyladan
Copy link
Member

dyladan commented Jun 3, 2021

You can track the release of the SDK which will be compatible with API 0.20.0 at #2246 but keep in mind that the document load instrumentation you're using will also need to be updated and released.

@Gio-Jimdo
Copy link

Thank you, @dyladan!!

Using this version scheme, I'm able to work with spans as expected.

  "dependencies": {
    "@opentelemetry/api": "1.0.0-rc.3",
    "@opentelemetry/api-metrics": "0.19.0",
    "@opentelemetry/context-zone": "0.19.0",
    "@opentelemetry/core": "0.19.0",
    "@opentelemetry/exporter-collector": "0.19.0",
    "@opentelemetry/instrumentation": "0.19.0",
    "@opentelemetry/instrumentation-document-load": "0.16.0",
    "@opentelemetry/metrics": "0.19.0",
    "@opentelemetry/web": "0.19.0"
  }

@dyladan dyladan closed this as completed Jun 3, 2021
@boningh
Copy link
Author

boningh commented Jun 3, 2021

Thank you guys!

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

No branches or pull requests

3 participants