Skip to content

Conversation

@hassiebp
Copy link
Contributor

@hassiebp hassiebp commented Jul 7, 2025

Important

Add trace_id and parent_observation_id parameters to OpenAiArgsExtractor in openai.py for enhanced tracing.

  • Behavior:
    • Add trace_id and parent_observation_id parameters to OpenAiArgsExtractor.__init__() in openai.py.
    • Store trace_id and parent_observation_id in self.args for further processing.
  • Misc:
    • No changes to existing functionality, only additional parameters for enhanced tracing.

This description was created by Ellipsis for bc3917d. You can customize this summary. It will automatically update as commits are pushed.

Greptile Summary

Disclaimer: Experimental PR review

Added support for trace_id and parent_observation_id parameters in OpenAI integration to enable better tracing and observation context linking in langfuse/openai.py.

  • Added parameter validation to ensure parent_observation_id cannot be set without a trace_id for data consistency
  • Enhanced OpenAiArgsExtractor to properly handle new tracing parameters in request pipeline
  • Improved observability by allowing explicit trace linking through parameter configuration

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

1 file reviewed, no comments
Edit PR Review Bot Settings | Greptile

@hassiebp hassiebp merged commit b6bba2e into main Jul 9, 2025
10 checks passed
@hassiebp hassiebp deleted the fix-openai-trace-id-setting branch July 9, 2025 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants