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

write manual inputs and outputs on LLM spans #220

Merged
merged 1 commit into from
Nov 18, 2024
Merged

Conversation

dinmukhamedm
Copy link
Member

@dinmukhamedm dinmukhamedm commented Nov 18, 2024

Write LLM span inputs and outputs if they were set manually as lmnr.span.input and lmnr.span.output. This gets higher priority then openllmetry/ai-sdk/litellm attributes


Important

Prioritize manually set lmnr.span.input and lmnr.span.output over other attributes in Span::from_otel_span().

  • Behavior:
    • Prioritize manually set lmnr.span.input and lmnr.span.output attributes over gen_ai, vercel, and LiteLLM attributes in Span::from_otel_span().
  • Misc:
    • Adjusted logic in spans.rs to ensure manual attributes are checked after LLM span type determination.

This description was created by Ellipsis for f2145da. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to f2145da in 43 seconds

More details
  • Looked at 38 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. app-server/src/traces/spans.rs:340
  • Draft comment:
    Consider refactoring the repeated code for setting manual LLM span inputs and outputs into a separate function to improve readability and maintainability.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code block for setting manual LLM span inputs and outputs is repeated multiple times. It can be refactored into a separate function to improve code readability and maintainability.

Workflow ID: wflow_Dr4sII1QrbqldsWF


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@dinmukhamedm dinmukhamedm merged commit 13c7b5b into dev Nov 18, 2024
1 check passed
@dinmukhamedm dinmukhamedm deleted the fix/manual-llm-spans branch November 18, 2024 21:58
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.

1 participant