Skip to content

Start MCP Instrumentation Library #3678

Closed
liustve wants to merge 4 commits intoopen-telemetry:mainfrom
liustve:mcp-instrumentation-support
Closed

Start MCP Instrumentation Library #3678
liustve wants to merge 4 commits intoopen-telemetry:mainfrom
liustve:mcp-instrumentation-support

Conversation

@liustve
Copy link
Copy Markdown
Contributor

@liustve liustve commented Aug 5, 2025

Description

This PR begins the basic structure of adding instrumentation to the mcp following the same structure as:

AWS Distro for OpenTelemetry (ADOT) is in process of developing an mcp instrumentation library package and would like to contribute the work. It is currently limited to traces only and doesn't include metrics and log events.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated


[project.optional-dependencies]
instruments = [
"mcp >= 0.1.6",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not make this mistake again, please. Can you bump this version to a relatively new one?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry. Done!

Copy link
Copy Markdown
Member

@Kludex Kludex Aug 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to apologize, I meant because of Starlette and httpx.

Comment thread pyproject.toml Outdated
Comment on lines +219 to +220
"instrumentation-genai/opentelemetry-instrumentation-mcp/tests/**/*.py",
"instrumentation-genai/opentelemetry-instrumentation-mcp/examples/**/*.py",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm disappointed this exclude section grew so much and by new projects... It was not supposed to be used by new projects.

I don't think it makes sense to add those 2. Supporting proper type hints from the beginning is easier.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@aabmass
Copy link
Copy Markdown
Member

aabmass commented Feb 12, 2026

@liustve 👋 the MCP semantic conventions from open-telemetry/semantic-conventions#2083 were just recently merged and released. Are you still interested in working on this?

@liustve
Copy link
Copy Markdown
Contributor Author

liustve commented Feb 13, 2026

@liustve 👋 the MCP semantic conventions from open-telemetry/semantic-conventions#2083 were just recently merged and released. Are you still interested in working on this?

Hi @aabmass yes I'm still interested! Though my bandwidth is a bit limited right now I can allocate sometime every week to port in all of the instrumentation code in separate PRs

@aabmass
Copy link
Copy Markdown
Member

aabmass commented Feb 13, 2026

port in all of the instrumentation code in separate PRs

Cool I am also interested in working on this, but we will have to figure out what to name this package since it is already taken by OpenLLMetry. We can possibly do a shared ownership with them like we do for some other packages, I'll have to check with @nirga

@github-actions
Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment.
If you're still working on this, please add a comment or push new commits.

@github-actions github-actions Bot added the Stale label Mar 11, 2026
@github-actions
Copy link
Copy Markdown

This PR has been closed due to inactivity. Please reopen if you would like to continue working on it.

@github-actions github-actions Bot closed this Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants