Open nathanscully opened 1 day ago
Hi @nathanscully, thanks for writing in and providing comprehensive reproduction.
We'll take a look.
@nathanscully could you try updating to 8.37.1
for both @sentry/node
and @sentry/opentelemetry
and try again? When I try with the latest version I don't get those errors anymore and I see http.route
set correctly (looking at Sentry ui at least).
I tried looking through our fastify integration but we don't really strip the http.route
anywhere. I'll have to have a deeper look.
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.36.0
Framework Version
Fastify 4.28.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
https://github.com/nathanscully/otel-sentry-fastify
Repo contains three different versions of Fastify / Sentry / Otel setup
Steps to Reproduce
Clone the repo and run the various start commands against an otel-collector.
Only OTEL
pnpm start:otel
will run a standard otel setup, which patches Fastify and emits metrics. In the otel collector you can see thehttp.route
metric includes:Sentry Docs Example
pnpm start:sentry-docs
will run the copy/paste from the Otel Sentry docs. I can't get any metrics to emit to Otel doing it this way. Would love an example if I am doing something wrong here. Note that when I run this I still get the following errors and warnings:Which I find strange given that this is straight out of the docs - would be good to understand why its still throwing warnings and errors.
Sentry + Custom OTEL
pnpm start:otel-sentry
will run my attempt at getting Sentry to play nice with Otel's NodeSDK. Traces emit ok, but the metrics from fastify have thehttp.route
stripped, which is breaking all our reporting:Expected Result
Goal
Emit traces and metrics to a custom otel collector and use Sentry for error handling. If we also need to emit traces to Sentry to make this work, thats fine, but it's my preference not to.
What is not working
When using Sentry + Fastify + a custom Otel setup, Sentry appears to strip the
http.route
from thehttp.server.duration
metrics making reporting by endpoint impossible.Actual Result