-
Notifications
You must be signed in to change notification settings - Fork 555
Cleanup op and description mapping #4560
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
base: potel-base
Are you sure you want to change the base?
Conversation
❌ 33 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
ef85b4a
to
666b8ed
Compare
3777d75
to
12c5914
Compare
@@ -822,7 +822,7 @@ def test_clickhouse_dbapi_spans(sentry_init, capture_events, capture_envelopes) | |||
span.pop("span_id", None) | |||
span.pop("start_timestamp", None) | |||
span.pop("timestamp", None) | |||
span.pop("status") | |||
span.pop("status", None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these were all None
before anyway
12c5914
to
e83681a
Compare
e83681a
to
b230b84
Compare
assert len(transaction["spans"]) == 7 | ||
|
||
assert ( | ||
render_span_tree(transaction) | ||
== f"""\ | ||
- op="caches": description=null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here and in all subsequent tests, I made it clear that the transaction name is correct and that the op of the root span is not the transaction name anymore
The main change is that
op
is now optional andname
anddescription
are basically interchangeable and map to each other as best as possible.Preference is given to explicitly set values (
SentrySpanAttribute
) and if not (in the case of pure otel spans), we try to derive them. The entire flow is much cleaner now instead of repeated calls to the same attributes.(For the main mapping changes in
opentelemetry/test_utils
I'd recommend reading the new code instead of the diff.)