-
-
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
[Express-OTEL] Transaction Name Quality #6301
Comments
@smeubank for the opentelemetry-demo, I elected to use re: Here we see the different transaction type examples, for HTTP the method is not set, unparameterized transaction names, or names which don't fit the expectation This is because we only do minimal transformation of transaction name/span description/operation in the SDK. When we introduce the Relay side transforms, this will improve over time. |
further context: the Due to concerns around high cardnality during the implementation and rollout of Dynamic Sampling improvements to the Sentry backend, it was decided that if txns do not have properly parameterized txn names then they cannot really provide a lot of value since there will be some variance in agregating the performance data associated with them Outcome:
|
Parent issue, where work was done to improve this across JS frameworks: Scroll to -> |
In OpenTelemetry, the semantic convention attributes have clear outlines about their potential cardinality. For example with the HTTP semantic conventions (https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md), |
I'd like us to use Jaeger as a reference here. |
@AbhiPrasad would it be possible to handle these very obvious cases in the JS SDK until Relay catches up? |
We elected to just put basic transformations in favor of an MVP - I would just wait till the Relay work is done for this since that is the more holistic solution, otherwise we will have to keep duplicating this for Ruby, Java (soon to release as well). |
@AbhiPrasad hopefully Relay is done before all the other SDKs are. Or let's put it like that: The way it is now, I don't want to show it to anyone. |
@AbhiPrasad where are these values from the "actual result" screenshot in the issue coming from? These entries look like a mixture of payloads, low-level span ops, and incomplete information (in the case of "HTTP GET"). If we ignore the Now, to The conversation about semantic conventions absolutely makes sense, but to me it looks like the root cause of the original issue is a plain SDK bug. |
This is what the OpenTelemetry span name is, and our baseline heuristic is to turn the otel span name -> sentry transaction name by default (OpenTelemetry span names are low cardinality values). We can adjust this heuristic once we start doing semantic conventions - we can generate a more useful transaction name based on a combination of the span name + span attributes.
This was coming from transactions from vanilla javascript, which was generated by a Sentry SDK, not a OpenTelemetry one - the OpenTelemetry transactions should be always low cardinality, we've taken many steps to make sure that is the case. |
Just to make sure, only |
My mistake then. This is still due to our transformation problem since we set transaction source based on attribute existence in otel: https://github.com/getsentry/sentry-javascript/blob/master/packages/opentelemetry-node/src/utils/parse-otel-span-description.ts#L101. This helps decide transaction name quality. Looking at https://sentry.io/organizations/sentry-test/performance/voting-service-green:6f73334593524e8ba3a9a7934d0ba6ac/?transaction=GET+%2F, an example event from This is something we'll have to fix with the express auto-instrumentation for OpenTelemetry node - they are not setting the parameterized route correctly. |
Got it
Yes, but let's not rely on that solution the meantime. There may be a good reason why it is like that and Jaeger can make sense of the data as is. I did some digging and this might be a solution in the meantime: If The discussion we are having is a good example why it makes sense to temporarily implement this directly on the SDK. |
#6345 should fix the incorrect status code (we were expecting the wrong type here). |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/node
SDK Version
7.21.1
Framework Version
node v16.16.0, express 4.16.4
Link to Sentry event
https://sentry.io/organizations/sentry-test/performance/summary/?project=4504209954111488&query=&referrer=performance-transaction-summary&statsPeriod=24h&transaction=%7B%22ismaster%22%3A%22%3F%22%7D&unselectedSeries=p100%28%29
Steps to Reproduce
Expected Result
Quality transaction names
Some of these examples are from API routes and others from DB interactions
Actual Result
Here we see the different transaction type examples, for HTTP the method is not set, unparameterized transaction names, or names which don't fit the expectation
checking the Sentry-SDKs org as well we see a mix of <>, custom, route. Would need to look into more individual events there to check the transaction source as the cause, and unclear how much of the data is a mix of Sentry SDK or OTEL SDK -> Sentry
Also not sure that we have data for the express OTEL demo service yet, screenshot is the NextJs services
https://sentry.io/organizations/sentry-sdks/performance/?project=4504094581063680&project=4504078691663872&project=4504078555545600&project=4504118601187328&project=4504118275604480&project=4504118274883584&statsPeriod=7d
The text was updated successfully, but these errors were encountered: