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

OTLP/HTTP does not use OTEL_EXPORTER_OTLP_ENDPOINT as a base URL correctly. #2968

Closed
TylerHelmuth opened this issue Mar 3, 2022 · 5 comments
Labels
bug Something isn't working pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package Stale Issues and pull requests which have been flagged for closing due to inactivity

Comments

@TylerHelmuth
Copy link
Member

TylerHelmuth commented Mar 3, 2022

Bug Report

Symptom

OTEL_EXPORTER_OTLP_ENDPOINT is not being treated as a base url in the OTLP HTTP exporter as per the OTLP/HTTP spec. Instead, the signal endpoint is being appended only if it is not already present. Method in question is AppendPathIfNotPresent.

What is the expected behavior?

No matter what OTEL_EXPORTER_OTLP_ENDPOINT is, the signal endpoint should be appended using slashes appropriately. For example, if OTEL_EXPORTER_OTLP_ENDPOINT is http://localhost:4318/v1/traces/, then the resulting url should be http://localhost:4318/v1/traces/v1/traces for traces.

What is the actual behavior?

The signal endpoint is only appended if it is not already present. For example, if OTEL_EXPORTER_OTLP_ENDPOINT is http://localhost:4318/v1/traces/ the signal endpoint is not appended.

Reproduce

Set OTEL_EXPORTER_OTLP_ENDPOINT to be http://localhost:4318/v1/traces/.
Observer that traces are send to http://localhost:4318/v1/traces instead of http://localhost:4318/v1/traces/v1/traces.

Additional Context

I realize this is a pretty silly issue. Maybe the spec needs updated? Definitely open that discussion.

@kedare
Copy link

kedare commented May 26, 2023

+1 on this, this is quite critical, it's the only implementation I found that doesn't respect this specification.

@MeijerM1
Copy link

MeijerM1 commented Nov 7, 2023

Is there any update on this? It seems like quite a big issue that the OTLP exporter is simply not respecting the spec when using OTLP/HTTP.

@cijothomas cijothomas added the pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package label Feb 22, 2024
@cijothomas
Copy link
Member

#5054 maybe same/duplicate!

Copy link
Contributor

This issue was marked stale due to lack of activity and will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. This bot runs once per day.

@github-actions github-actions bot added the Stale Issues and pull requests which have been flagged for closing due to inactivity label Dec 19, 2024
Copy link
Contributor

Closed as inactive. Feel free to reopen if this issue is still a concern.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package Stale Issues and pull requests which have been flagged for closing due to inactivity
Projects
None yet
Development

No branches or pull requests

4 participants