Skip to content

Fix OTLP endpoint path handling per OpenTelemetry spec#19154

Merged
harupy merged 1 commit intomlflow:masterfrom
harupy:fix-otlp-endpoint-path
Dec 2, 2025
Merged

Fix OTLP endpoint path handling per OpenTelemetry spec#19154
harupy merged 1 commit intomlflow:masterfrom
harupy:fix-otlp-endpoint-path

Conversation

@harupy
Copy link
Member

@harupy harupy commented Dec 2, 2025

🛠 DevTools 🛠

Open in GitHub Codespaces

Install mlflow from this PR

# mlflow
pip install git+https://github.com/mlflow/mlflow.git@refs/pull/19154/merge
# mlflow-skinny
pip install git+https://github.com/mlflow/mlflow.git@refs/pull/19154/merge#subdirectory=libs/skinny

For Databricks, use the following command:

%sh curl -LsSf https://raw.githubusercontent.com/mlflow/mlflow/HEAD/dev/install-skinny.sh | sh -s pull/19154/merge

What changes are proposed in this pull request?

Per the OTel spec:

  • OTEL_EXPORTER_OTLP_TRACES_ENDPOINT / OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: Full URL used as-is
  • OTEL_EXPORTER_OTLP_ENDPOINT: Base URL, requires appending signal path (/v1/traces or /v1/metrics)

The previous implementation passed both values directly to the SDK without appending the path for the base endpoint case. This worked by accident because the SDK only appends the path when it reads environment variables itself, not when an explicit endpoint argument is passed.

How is this PR tested?

  • Existing unit/integration tests

Does this PR require documentation update?

  • No. You can skip the rest of this section.

Release Notes

Is this a user-facing change?

  • Yes. Give a description of this change to be included in the release notes for MLflow users.

Fix OTLP endpoint path handling to correctly append /v1/traces or /v1/metrics when using OTEL_EXPORTER_OTLP_ENDPOINT base URL.

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionality

How should the PR be classified in the release notes? Choose one:

  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes

Should this PR be included in the next patch release?

  • Yes (this PR will be cherry-picked and included in the next patch release)
  • No (this PR will be included in the next minor release)

🤖 Generated with Claude Code

Per the OTel spec, OTEL_EXPORTER_OTLP_ENDPOINT is a base URL that requires
appending the signal path (/v1/traces or /v1/metrics), while signal-specific
endpoints (OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, OTEL_EXPORTER_OTLP_METRICS_ENDPOINT)
should be used as-is.

The previous implementation passed both values directly to the SDK without
appending the path for the base endpoint case. This worked by accident because
the SDK only appends the path when it reads environment variables itself, not
when an explicit endpoint argument is passed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
@github-actions github-actions bot added the v3.7.0 label Dec 2, 2025
@harupy harupy requested a review from serena-ruan December 2, 2025 07:41
@github-actions github-actions bot added area/tracing MLflow Tracing and its integrations rn/bug-fix Mention under Bug Fixes in Changelogs. labels Dec 2, 2025
@harupy harupy requested a review from B-Step62 December 2, 2025 07:43
@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

Documentation preview for 880cdca is available at:

More info
  • Ignore this comment if this PR does not change the documentation.
  • The preview is updated when a new commit is pushed to this PR.
  • This comment was created by this workflow run.
  • The documentation was built by this workflow run.

Copy link
Collaborator

@serena-ruan serena-ruan left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the fix!

Copy link
Collaborator

@B-Step62 B-Step62 left a comment

Choose a reason for hiding this comment

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

LGTM!

@harupy harupy merged commit 14a82ee into mlflow:master Dec 2, 2025
56 of 61 checks passed
@harupy harupy deleted the fix-otlp-endpoint-path branch December 2, 2025 08:27
BenWilson2 pushed a commit to BenWilson2/mlflow that referenced this pull request Dec 4, 2025
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
BenWilson2 pushed a commit that referenced this pull request Dec 4, 2025
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tracing MLflow Tracing and its integrations rn/bug-fix Mention under Bug Fixes in Changelogs. v3.7.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants