Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAI instrumentation should capture events regardless of span recording #3217

Open
aabmass opened this issue Jan 28, 2025 · 0 comments · May be fixed by #3226
Open

OpenAI instrumentation should capture events regardless of span recording #3217

aabmass opened this issue Jan 28, 2025 · 0 comments · May be fixed by #3226
Assignees
Labels
bug Something isn't working gen-ai Related to generative AI instrumentation

Comments

@aabmass
Copy link
Member

aabmass commented Jan 28, 2025

OpenAI instrumentation currently only emits events if the current span is recording

if span.is_recording():
for message in kwargs.get("messages", []):
event_logger.emit(
message_to_event(message, capture_content)
)

This was identified as a bug while discussing #3203 (comment). Follow up work is to allow users to get this same behavior (smart event sampling) but with SDK config rather than hardcoding in instrumentation (see #3207).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gen-ai Related to generative AI instrumentation
Development

Successfully merging a pull request may close this issue.

2 participants