Skip to content

Conversation

@sentrivana
Copy link
Contributor

@sentrivana sentrivana commented Oct 11, 2024

trace_state.add will never overwrite existing entries -- this is good. However, everytime it bails, it logs a warning, which then shows up in breadcrumbs in tests.

WARNING  opentelemetry.trace.span:span.py:308 The provided key sentry-sampled already exists.
WARNING  opentelemetry.trace.span:span.py:308 The provided key sentry-sample_rate already exists.
WARNING  opentelemetry.trace.span:span.py:308 The provided key sentry-sampled already exists.
WARNING  opentelemetry.trace.span:span.py:308 The provided key sentry-sample_rate already exists.
WARNING  opentelemetry.trace.span:span.py:308 The provided key sentry-sampled already exists.
...

In this PR we explicitly check before adding.

@sentrivana sentrivana changed the title Only add to trace state if key does not exist Only add to trace state if key does not exist Oct 11, 2024
@codecov
Copy link

codecov bot commented Oct 11, 2024

❌ 2952 Tests Failed:

Tests completed Failed Passed Skipped
20072 2952 17120 4443
View the top 3 failed tests by shortest run time
tests.integrations.litestar.test_litestar test_middleware_callback_spans
Stack Traces | 0s run time
No failure message available
tests.integrations.litestar.test_litestar test_middleware_partial_receive_send
Stack Traces | 0s run time
No failure message available
tests.integrations.litestar.test_litestar test_span_origin
Stack Traces | 0s run time
No failure message available

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

@sentrivana sentrivana marked this pull request as ready for review October 11, 2024 12:49
@sentrivana sentrivana merged commit 1c72747 into potel-base Oct 11, 2024
13 of 109 checks passed
@sentrivana sentrivana deleted the ivana/potel/trace-state-warnings branch October 11, 2024 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants