-
Notifications
You must be signed in to change notification settings - Fork 32
✨ Add x-osparc-trace-id to response headers for requests hitting webserver and api-server
#7796
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
Merged
bisgaard-itis
merged 20 commits into
ITISFoundation:master
from
bisgaard-itis:7795-add-osparc-trace-id-to-response-headers
Jun 13, 2025
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
1f73bf7
add osparc-trace-id response header to api-server and webserver
bisgaard-itis f3bcb28
handle exceptions in aiohttp response
bisgaard-itis 67332de
use lower case because fastapi is case insensitive
bisgaard-itis 1080ee0
add test to check osparc-trace-id is in response header
bisgaard-itis b417f85
factor out span processor creating in fastapi case
bisgaard-itis 456b386
add test in fastapi case
bisgaard-itis ab4db0f
clean up aiottp test
bisgaard-itis 91f7dff
Merge branch 'master' into 7795-add-osparc-trace-id-to-response-headers
bisgaard-itis d40b84c
make pylint happy
bisgaard-itis 935ceb3
Merge branch 'master' into 7795-add-osparc-trace-id-to-response-headers
bisgaard-itis c820e6b
Merge branch 'master' into 7795-add-osparc-trace-id-to-response-headers
bisgaard-itis 9ec76d4
changes according to PR feedback @pcrespov
bisgaard-itis e800462
add check that trace id is propagated correctly in fastapi
bisgaard-itis a0bc75c
add check that propagated trace id is correct in aiohttp
bisgaard-itis 2bb6979
Merge branch 'master' into 7795-add-osparc-trace-id-to-response-headers
bisgaard-itis b89287a
Merge branch 'master' into 7795-add-osparc-trace-id-to-response-headers
bisgaard-itis 7e60eb8
Merge branch 'master' into 7795-add-osparc-trace-id-to-response-headers
bisgaard-itis 1ba1f4c
Merge branch 'master' into 7795-add-osparc-trace-id-to-response-headers
bisgaard-itis 072ff8d
Merge branch 'master' into 7795-add-osparc-trace-id-to-response-headers
bisgaard-itis b002ff7
Merge branch 'master' into 7795-add-osparc-trace-id-to-response-headers
bisgaard-itis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,20 @@ | ||
| # pylint: disable=redefined-outer-name | ||
| # pylint: disable=unused-argument | ||
|
|
||
|
|
||
| from collections.abc import Iterator | ||
|
|
||
| import pytest | ||
| from opentelemetry.sdk.trace.export import SimpleSpanProcessor | ||
| from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter | ||
| from pytest_mock import MockerFixture | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def mock_otel_collector(mocker: MockerFixture) -> Iterator[InMemorySpanExporter]: | ||
| memory_exporter = InMemorySpanExporter() | ||
| span_processor = SimpleSpanProcessor(memory_exporter) | ||
| mocker.patch( | ||
| "servicelib.aiohttp.tracing._create_span_processor", return_value=span_processor | ||
| ) | ||
| yield memory_exporter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.