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

Using Your Existing OpenTelemetry Setup examples doesnt seem to work #13933

Closed
3 tasks done
tmayr opened this issue Oct 10, 2024 · 2 comments
Closed
3 tasks done

Using Your Existing OpenTelemetry Setup examples doesnt seem to work #13933

tmayr opened this issue Oct 10, 2024 · 2 comments
Labels
Package: node Issues related to the Sentry Node SDK

Comments

@tmayr
Copy link

tmayr commented Oct 10, 2024

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

8.32.0

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

https://github.com/tmayr/sentry-own-otel-repro

Steps to Reproduce

I've been trying to upgrade to Sentry 8 for about a week now, but I keep having little issues here and there integrating it with our OTEL setup.

I've linked a minimal reproduction based on the examples, because it seems that following the examples just puts me in a place full of errors and non working results. No matter how I set it up, i always end up with errors around SentryPropagator/SentrySampler not being setup properly.

Not sure if it's an actual bug, or there's something wrong in my setup?

Thanks!

Expected Result

Sentry.validateOpenTelemetrySetup() actually validating the setup properly and/or the setup being done properly.

Actual Result

Image

@github-actions github-actions bot added the Package: node Issues related to the Sentry Node SDK label Oct 10, 2024
@tmayr tmayr changed the title Using Your Existing OpenTelemetry Setup examples dont seem to work Using Your Existing OpenTelemetry Setup examples doesnt seem to work Oct 10, 2024
@mydea
Copy link
Member

mydea commented Oct 10, 2024

Looking at the example, the problem is that your versions of @sentry/xxx are not aligned. you have to use the same versions for @sentry/node and @sentry/opentelemetry. If I updated this to:

{
  "name": "fastify-test",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "start": "node -r ./instrumentation.js ./index.js"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "description": "",
  "dependencies": {
    "@fastify/express": "^2.3.0",
    "@opentelemetry/api": "^1.9.0",
    "@opentelemetry/sdk-trace-node": "^1.26.0",
    "@sentry/node": "8.33.1",
    "@sentry/opentelemetry": "8.33.1",
    "fastify": "^4.24.0"
  }
}

the example app works for me!

@tmayr
Copy link
Author

tmayr commented Oct 10, 2024

That makes sense, sadly on the project I'm trying this on, it still fails with the same error with all the version aligned, so I'll see if i can dig out another reproduction case for that.

The upgrade and making it play with our Otel has been quite painful to be honest 😅

I'll open another issue if I manage to isolate another problem, but it would be nice if there's some validation across library versions to make sure things are aligned. Would be very easy for someone to update one package and not the other ones and then suddenly everything stops working without any warnings.

I'll go ahead and close it for now, thanks for the quick answer!

@tmayr tmayr closed this as completed Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: node Issues related to the Sentry Node SDK
Projects
Archived in project
Development

No branches or pull requests

2 participants