| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:37cd295d-1695-c996-a27f-0ad06ecb73e8 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8E28:12F83A:3535E3:4BB6E6:6A622039 |
| html-safe-nonce | dbe11ef64a2498d55b0732182c9a0e8875a219b6fe41c3ecdd2cbd65416192c1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTI4OjEyRjgzQTozNTM1RTM6NEJCNkU2OjZBNjIyMDM5IiwidmlzaXRvcl9pZCI6IjQ0Nzg3NzU5MjA3NzUyNzQ1NTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 744440a4da82fd0ca8c24527ea41259c852d76eb1f94d8582473f219fc66dc92 |
| hovercard-subject-tag | pull_request:3473280202 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///pull_requests/show/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
| twitter:image | https://avatars.githubusercontent.com/u/7353520?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/7353520?s=400&v=4 |
| og:image:alt | Summary
Adds OpenTelemetry tracing to MCP client and server request handling, with W3C trace context propagation via _meta per SEP-414.
opentelemetry-api is added as a mandatory dependency. It prov... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | be68eaf9abf2a202afbd94047d7200fb88b7edb0338f533bf171bbb1a69fab4e |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3d00b04c8874615454dfbdb32a7d2ca4db66d3f4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F2381%2Ffiles |
| Search syntax tips | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
| documentation | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F2381%2Ffiles |
|
Sign up
| https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=modelcontextprotocol%2Fpython-sdk |
| Reload | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
| Reload | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
| Reload | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
| Please reload this page | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
|
modelcontextprotocol
| https://github.com/modelcontextprotocol |
| python-sdk | https://github.com/modelcontextprotocol/python-sdk |
|
Notifications
| https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fpython-sdk |
|
Fork
3.7k
| https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fpython-sdk |
|
Star
23.7k
| https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fpython-sdk |
|
Code
| https://github.com/modelcontextprotocol/python-sdk |
|
Issues
269
| https://github.com/modelcontextprotocol/python-sdk/issues |
|
Pull requests
314
| https://github.com/modelcontextprotocol/python-sdk/pulls |
|
Actions
| https://github.com/modelcontextprotocol/python-sdk/actions |
|
Projects
| https://github.com/modelcontextprotocol/python-sdk/projects |
|
Models
| https://github.com/modelcontextprotocol/python-sdk/models |
|
Security and quality
6
| https://github.com/modelcontextprotocol/python-sdk/security |
|
Insights
| https://github.com/modelcontextprotocol/python-sdk/pulse |
|
Code
| https://github.com/modelcontextprotocol/python-sdk |
|
Issues
| https://github.com/modelcontextprotocol/python-sdk/issues |
|
Pull requests
| https://github.com/modelcontextprotocol/python-sdk/pulls |
|
Actions
| https://github.com/modelcontextprotocol/python-sdk/actions |
|
Projects
| https://github.com/modelcontextprotocol/python-sdk/projects |
|
Models
| https://github.com/modelcontextprotocol/python-sdk/models |
|
Security and quality
| https://github.com/modelcontextprotocol/python-sdk/security |
|
Insights
| https://github.com/modelcontextprotocol/python-sdk/pulse |
| Sign up for GitHub
| https://github.com/signup?return_to=%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2Fnew%2Fchoose |
| terms of service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2Fnew%2Fchoose |
| maxisbey | https://github.com/maxisbey |
| main | https://github.com/modelcontextprotocol/python-sdk/tree/main |
| marcelo/otel-spans | https://github.com/modelcontextprotocol/python-sdk/tree/marcelo/otel-spans |
|
Conversation
13
| https://github.com/modelcontextprotocol/python-sdk/pull/2381 |
|
Commits
16
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/commits |
|
Checks
30
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/checks |
|
Files changed
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
| Please reload this page | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
|
Add basic OpenTelemetry tracing for client and server requests
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#top |
|
Show all changes
16 commits
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
|
bbdd99b
Add basic OpenTelemetry tracing for client and server requests
Kludex Mar 31, 2026
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/commits/bbdd99bf9c347038238db56d9223a248eef98900 |
|
e1ebbc7
Make opentelemetry-api a mandatory dependency
Kludex Mar 31, 2026
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/commits/e1ebbc7e5944523e93f68adfbcef4d037c6fda6c |
|
7795f34
Use logfire[testing] for OTel test assertions
Kludex Mar 31, 2026
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/commits/7795f34ec6afa4ca01a0721bf2ed49121cfd624e |
|
e2d4b03
Use 'MCP send' prefix for outgoing request spans
Kludex Mar 31, 2026
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/commits/e2d4b03e4cd9aebbcd159cf63b75fc979579f093 |
|
0e0b746
Propagate W3C trace context via _meta per SEP-414
Kludex Mar 31, 2026
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/commits/0e0b746b0cc203b66aec137ae00fd02f46e56caa |
|
54f8787
Address review feedback on type annotations and _meta injection
Kludex Mar 31, 2026
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/commits/54f87874d2e8731567b7e44b5f44b1376231542d |
|
a700ab9
Merge branch 'main' into marcelo/otel-spans
Kludex Mar 31, 2026
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/commits/a700ab91dd5ffbc41c90d262ac5389114e24a22c |
|
2369988
Skip OTel test when logfire.testing is not available
Kludex Mar 31, 2026
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/commits/2369988904570ffc2af8e0d1a90478c9118c5aef |
|
f43dc4a
Merge branch 'marcelo/otel-spans' of github.com:modelcontextprotocol/…
Kludex Mar 31, 2026
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/commits/f43dc4a86da5ac993530caf8f75b5e949e58c0a8 |
|
0391854
Pin logfire>=3.0.0 dev dependency and restore direct import
Kludex Mar 31, 2026
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/commits/03918548d8b84515af22c600528bc9541af66c2d |
|
1ee1dfd
Use single backticks in docstrings
Kludex Mar 31, 2026
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/commits/1ee1dfd9a60b3e75deb1cd445f76a3e59fce69c7 |
|
d9dcc85
Record ERROR status on server spans for error responses
Kludex Mar 31, 2026
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/commits/d9dcc85b5bda9c74e3d1f1d9e90ea0c84675a1e0 |
|
f79767e
Move StatusCode import to top of file
Kludex Mar 31, 2026
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/commits/f79767e3221c97fea2a5a23f67184907b7b76459 |
|
8ae416e
Use SpanKind enum directly instead of string conversion
Kludex Mar 31, 2026
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/commits/8ae416e9bfa0b9a701f427b693c42d89435b8c89 |
|
b47c9c5
Add comment explaining filterwarnings on OTel test
Kludex Mar 31, 2026
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/commits/b47c9c5cf91ba232290a403227104fe444ee9a0b |
|
e00d336
Use isinstance assert instead of type: ignore in OTel test
Kludex Mar 31, 2026
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/commits/e00d336ee6cc26ac2dd08ca7eec4e2e7dd8ef89b |
|
Clear filters
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
| Please reload this page | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
| Please reload this page | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
|
pyproject.toml
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711 |
|
server.py
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4 |
|
_otel.py
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-f7b9208e58bf90e0bfe4ecf1f810dfdb14524bbd475f9f8e01c3df04355bd598 |
|
session.py
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-aaa1596dd4db91f5cd7f743c8afbe58596daf01a2ecec4a0024768f7409fb1dc |
|
test_otel.py
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-84f003b56f0cb53b4aa8d9c9b77caceba5fdebd6874448f02410dffb0815cbaa |
|
uv.lock
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-84321598744d84dbee2318e634c74c9aae39a1c253f1c4bd17ebf9ef2f807b11 |
| pyproject.toml | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711 |
|
View file
| https://github.com/modelcontextprotocol/python-sdk/blob/e00d336ee6cc26ac2dd08ca7eec4e2e7dd8ef89b/pyproject.toml |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/{{ revealButtonHref }} |
|
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711 |
|
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711 |
|
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711 |
|
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711 |
| src/mcp/server/lowlevel/server.py | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4 |
|
View file
| https://github.com/modelcontextprotocol/python-sdk/blob/e00d336ee6cc26ac2dd08ca7eec4e2e7dd8ef89b/src/mcp/server/lowlevel/server.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/{{ revealButtonHref }} |
|
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4 |
|
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4 |
|
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4 |
|
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4 |
| Please reload this page | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
| claude | https://github.com/apps/claude |
| Mar 31, 2026 | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#r3017819388 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
| Kludex | https://github.com/Kludex |
| Mar 31, 2026 | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#r3017992800 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
|
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4 |
| src/mcp/shared/_otel.py | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-f7b9208e58bf90e0bfe4ecf1f810dfdb14524bbd475f9f8e01c3df04355bd598 |
|
View file
| https://github.com/modelcontextprotocol/python-sdk/blob/e00d336ee6cc26ac2dd08ca7eec4e2e7dd8ef89b/src/mcp/shared/_otel.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/{{ revealButtonHref }} |
| src/mcp/shared/session.py | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-aaa1596dd4db91f5cd7f743c8afbe58596daf01a2ecec4a0024768f7409fb1dc |
|
View file
| https://github.com/modelcontextprotocol/python-sdk/blob/e00d336ee6cc26ac2dd08ca7eec4e2e7dd8ef89b/src/mcp/shared/session.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/{{ revealButtonHref }} |
|
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-aaa1596dd4db91f5cd7f743c8afbe58596daf01a2ecec4a0024768f7409fb1dc |
|
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-aaa1596dd4db91f5cd7f743c8afbe58596daf01a2ecec4a0024768f7409fb1dc |
|
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-aaa1596dd4db91f5cd7f743c8afbe58596daf01a2ecec4a0024768f7409fb1dc |
| claude | https://github.com/apps/claude |
| Mar 31, 2026 | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#r3017788848 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
| Kludex | https://github.com/Kludex |
| Mar 31, 2026 | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#r3017991728 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
|
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-aaa1596dd4db91f5cd7f743c8afbe58596daf01a2ecec4a0024768f7409fb1dc |
| tests/shared/test_otel.py | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files#diff-84f003b56f0cb53b4aa8d9c9b77caceba5fdebd6874448f02410dffb0815cbaa |
|
View file
| https://github.com/modelcontextprotocol/python-sdk/blob/e00d336ee6cc26ac2dd08ca7eec4e2e7dd8ef89b/tests/shared/test_otel.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/modelcontextprotocol/python-sdk/pull/2381/{{ revealButtonHref }} |
| Please reload this page | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
| Please reload this page | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
| Please reload this page | https://github.com/modelcontextprotocol/python-sdk/pull/2381/files |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |