-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
feat(langfuse): upgrade SDK and OTel ingestion to v4 #33391
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
base: litellm_internal_staging
Are you sure you want to change the base?
Changes from 11 commits
8d05102
db87acd
a380346
5ac7059
d86cb54
fe4b39c
6718676
aaeb263
960d350
620c1b4
2c1dfdb
5be1e40
464c10d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -126,11 +126,11 @@ proxy-runtime = [ | |
| "anthropic[vertex]>=0.84.0,<1.0", | ||
| "grpcio==1.78.0", | ||
| "prometheus-client>=0.20.0,<1.0", | ||
| "langfuse>=2.59.7,<3.0", | ||
| "opentelemetry-api==1.28.0", | ||
| "opentelemetry-sdk==1.28.0", | ||
| "opentelemetry-exporter-otlp==1.28.0", | ||
| "opentelemetry-instrumentation-fastapi==0.49b0", | ||
| "langfuse>=4.7,<5.0", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The minimum is raised from Rule Used: What: avoid backwards-incompatible changes without... (source) |
||
| "opentelemetry-api==1.33.1", | ||
| "opentelemetry-sdk==1.33.1", | ||
| "opentelemetry-exporter-otlp==1.33.1", | ||
| "opentelemetry-instrumentation-fastapi==0.54b1", | ||
| "ddtrace>=4.8.2,<5.0", | ||
| "sentry-sdk>=2.21.0,<3.0", | ||
| "mangum>=0.17.0,<1.0", | ||
|
|
@@ -171,11 +171,11 @@ dev = [ | |
| "types-PyYAML==6.0.12.20250915", | ||
| "botocore-stubs==1.43.14", | ||
| "types-boto3[bedrock,bedrock-agent,bedrock-runtime,kms,s3,sagemaker-runtime,sts]==1.43.30", | ||
| "opentelemetry-api==1.28.0", | ||
| "opentelemetry-sdk==1.28.0", | ||
| "opentelemetry-exporter-otlp==1.28.0", | ||
| "opentelemetry-instrumentation-fastapi==0.49b0", | ||
| "langfuse==2.59.7", | ||
| "opentelemetry-api==1.33.1", | ||
| "opentelemetry-sdk==1.33.1", | ||
| "opentelemetry-exporter-otlp==1.33.1", | ||
| "opentelemetry-instrumentation-fastapi==0.54b1", | ||
| "langfuse==4.7.0", | ||
| "fastapi-offline==1.7.6", | ||
| "fakeredis==2.34.1", | ||
| "pytest-rerunfailures==15.1", | ||
|
|
@@ -195,10 +195,10 @@ proxy-dev = [ | |
| "prisma==0.11.0", | ||
| "hypercorn==0.17.3", | ||
| "prometheus-client==0.20.0", | ||
| "opentelemetry-api==1.28.0", | ||
| "opentelemetry-sdk==1.28.0", | ||
| "opentelemetry-exporter-otlp==1.28.0", | ||
| "opentelemetry-instrumentation-fastapi==0.49b0", | ||
| "opentelemetry-api==1.33.1", | ||
| "opentelemetry-sdk==1.33.1", | ||
| "opentelemetry-exporter-otlp==1.33.1", | ||
| "opentelemetry-instrumentation-fastapi==0.54b1", | ||
| "azure-identity==1.25.2", | ||
| "a2a-sdk==1.1.0", | ||
| ] | ||
|
|
@@ -218,7 +218,7 @@ ci = [ | |
| "lunary==1.4.36; python_version == '3.10'", | ||
| "lunary==1.4.37; python_version >= '3.11'", | ||
| "logfire==4.6.0", | ||
| "traceloop-sdk==0.33.12", | ||
| "traceloop-sdk==0.34.0", | ||
| "detect-secrets==1.5.0", | ||
| "PyGithub==2.8.1", | ||
| "aiodynamo==24.7", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version attributes collide on OTel
Medium Severity
The
GENERATION_VERSIONandTRACE_VERSIONattributes now map to the samelangfuse.versionkey. This causes_set_metadata_attributesto overwrite one value when both are present, preventing distinct generation and trace versions from being recorded for Langfuse OTel spans. The SDK callback path still treats these fields as distinct.Reviewed by Cursor Bugbot for commit aaeb263. Configure here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in
2c1dfdb4f0e. Langfuse v4 uses the singlelangfuse.versionsemantic attribute; observationversionnow takes precedence over propagatedtrace_version, matching SDK behavior, with trace version used as the fallback