Make OpenTelemetry tracing the single default middleware (#2995)
This commit is contained in:
parent
cc596195bb
commit
b31d95a429
1 changed files with 260 additions and 238 deletions
9
docs_src/opentelemetry/tutorial001.py
Normal file
9
docs_src/opentelemetry/tutorial001.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
from mcp.server import MCPServer
|
||||
|
||||
mcp = MCPServer("Bookshop")
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def search_books(query: str) -> str:
|
||||
"""Search the catalog by title or author."""
|
||||
return f"Found 3 books matching {query!r}."
|
||||
Loading…
Reference in a new issue