-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
OpenTelemetry Express instrumentation does not match Sentry instrumentation #10168
Comments
Good findings!
Hmm, this comes directly from OTEL - not sure if/how we can/want to change this 🤔 what is the actual path that was used in this example?
I wonder if the OTEL behavior is not more correct there? I see in other places we actually use a full URL there, but not sure what is expected here 🤔 cc @AbhiPrasad ?
Oops, I will fixe this!
Hmm I wonder if we want to/can handle this. can you provide a diff (what it was/became)? Then I can see if we can handle these specifically! |
It's for this route: app.get(['/test/arr/:id', /\/test\/arr[0-9]*\/required(path)?(\/optionalPath)?\/(lastParam)?/], (_req, res) => {
res.send({ response: 'response 4' });
});
For middlewarre, the Sentry instrumentation: spans: [
expect.objectContaining({
description: 'corsMiddleware',
op: 'middleware.express.use',
}),
], For otel, the descriptions have changed like this, expect.objectContaining({
description: 'middleware - corsMiddleware',
origin: 'auto.http.otel.express',
}), |
I'd say the description is OK (it's different, but not wrong - this comes from otel directly). |
- Adds CJS integration tests for express for `@sentry/node-experimental` - I found some differences with the transactions vs the Sentry instrumentation (#10168) - Converts all the existing express tests to use the new runner - These are the only tests that dont appear to like the jest runner in their original form - Added a `cleanupChildProcesses()` method to the runner than should be called in the `afterAll` hook to ensure no processes are left open/leaked --------- Co-authored-by: Francesco Novy <francesconovy@gmail.com>
Given it seems like OTEL totally drops the ball with paramaterizing with multiple routers, we might have to combine the OTEL integration with ours 😢 (so that we can support multiple routers and dont regress too heavily). Alternative is that we export an integration that just supports multiple routers, and then people opt-into that, but its not the best UX. ref #9885 |
After moving tests over to the new node, we noticed that actually our express router tests are passing, but only in node 16+. Somehow, on Node 14 multi router support does not fully work, but since Node 16 it seems to work :O Which I guess is fine, we will document this. |
Which SDK are you using?
@sentry/node-experimental
SDK Version
latest
Steps to Reproduce
When adding integration tests for
@sentry/node-experimental
, I started by using the assertions from the@sentry/node
tests.It looks like:
transaction
for regex routes ends up as just/
data.url
is now the full URL rather than just the pathI'll add anything else I find!
The text was updated successfully, but these errors were encountered: