Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions agentops/instrumentation/agentic/agno/instrumentor.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def wrapper(wrapped, instance, args, kwargs):
def create_streaming_agent_async_wrapper(tracer, streaming_context_manager):
"""Create a streaming-aware async wrapper for agent run methods."""

def wrapper(wrapped, instance, args, kwargs):
async def wrapper(wrapped, instance, args, kwargs):
import inspect

# Get agent ID for context storage
Expand Down Expand Up @@ -465,7 +465,7 @@ def wrapper(wrapped, instance, args, kwargs):
# Execute the original function within agent context
context_token = otel_context.attach(current_context)
try:
result = wrapped(*args, **kwargs)
result = await wrapped(*args, **kwargs)
finally:
otel_context.detach(context_token)

Expand Down Expand Up @@ -880,7 +880,7 @@ def wrapper(wrapped, instance, args, kwargs):
def create_team_async_wrapper(tracer, streaming_context_manager):
"""Create an async wrapper for Team methods that establishes the team context."""

def wrapper(wrapped, instance, args, kwargs):
async def wrapper(wrapped, instance, args, kwargs):
import inspect

# Get team ID for context storage
Expand Down Expand Up @@ -910,7 +910,7 @@ def wrapper(wrapped, instance, args, kwargs):
# Execute the original function within team context
context_token = otel_context.attach(current_context)
try:
result = wrapped(*args, **kwargs)
result = await wrapped(*args, **kwargs)
finally:
otel_context.detach(context_token)

Expand Down