Skip to content

OpenAI instrumentation should capture events regardless of span recording #3217

@aabmass

Description

@aabmass

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).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions