Skip to content

Commit dc8cd45

Browse files
committed
chore: Cleanup and logfire naming
1 parent 4a770ce commit dc8cd45

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

basic_mcp_use/adk_mcp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
os.environ["GOOGLE_API_KEY"] = os.getenv("GEMINI_API_KEY")
1616

1717
# Configure logging if LOGFIRE_TOKEN is set
18-
logfire.configure(send_to_logfire="if-token-present")
18+
logfire.configure(send_to_logfire="if-token-present", service_name="adk-basic-mcp")
1919
logfire.instrument_mcp()
2020

2121

basic_mcp_use/langgraph_mcp.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
load_dotenv()
1313

1414
# Configure logging if LOGFIRE_TOKEN is set
15-
logfire.configure(send_to_logfire="if-token-present")
15+
logfire.configure(
16+
send_to_logfire="if-token-present", service_name="langgraph-basic-mcp"
17+
)
1618
logfire.instrument_mcp()
1719

1820

basic_mcp_use/oai-agent_mcp.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
import os
21
import asyncio
32

43
import logfire
5-
from dotenv import load_dotenv
64
from agents import Agent, Runner
75
from agents.mcp import MCPServerStdio
6+
from dotenv import load_dotenv
87

98
load_dotenv()
109

1110
# Configure Logfire
12-
logfire.configure(send_to_logfire="if-token-present")
11+
logfire.configure(send_to_logfire="if-token-present", service_name="oai-basic-mcp")
1312
logfire.instrument_mcp()
1413
logfire.instrument_openai_agents()
1514

basic_mcp_use/pydantic_mcp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
load_dotenv()
1010

1111
# Configure logging to logfire if LOGFIRE_TOKEN is set in environment
12-
logfire.configure(send_to_logfire="if-token-present")
12+
logfire.configure(send_to_logfire="if-token-present", service_name="pydantic-basic-mcp")
1313
logfire.instrument_mcp()
1414
logfire.instrument_pydantic_ai()
1515

run_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def get_current_time() -> str:
2323
# Add a dynamic greeting resource
2424
@mcp.resource("greeting://{name}")
2525
def get_greeting(name: str) -> str:
26-
"""Get a personalized greeting"""
26+
"""Get a personalised greeting"""
2727
return f"Hello, {name}!"
2828

2929

0 commit comments

Comments
 (0)