tempo icon indicating copy to clipboard operation
tempo copied to clipboard

http_api_prefix not implemented on distributor

Open Exubient opened this issue 2 years ago • 2 comments

While the query-frontend service has http_api_prefix implemented, there is no implementation of http_api_prefix in the distributor service.

While http_api_prefix is set to /tempo, ${base_url}/tempo/api/echo works fine. However, if I try to push my traces to ${base_url}/tempo/api/traces, it will not use the httpd_api_prefix which is set to /tempo

Expected behavior

Trace ingestions with http_api_prefix. I think there initDistributor should take a similar form from initQuerier where HTTP.Handle uses addHTTPAPIPrefix https://github.com/grafana/tempo/blob/main/cmd/tempo/app/modules.go#L202

I'm really new to traces, so please correct me if this feature/bug is a misunderstanding of the docs. Thank you.

Exubient avatar Sep 13 '22 05:09 Exubient

Hi @Exubient. Trace ingestion works a bit different than other API endpoints in Tempo. Trace ingestion is based on OpenTelemetry receivers (OTLP, jaeger, zipkin, etc), and each can support multiple protocols, besides HTTP. Adding a prefix to the HTTP ingestion endpoints could become a bit confusing, what should we do with other protocols (e.g. gRPC)? That's why we decided to leave the receivers as they are. I think we should add a line stating that the prefix does not apply to HTTP ingestion endpoints. cc/ @knylander-grafana

mapno avatar Sep 13 '22 08:09 mapno

@mapno Thank you for the detailed explanation 👍

henry-swatchon avatar Sep 14 '22 01:09 henry-swatchon

This issue has been automatically marked as stale because it has not had any activity in the past 60 days. The next time this stale check runs, the stale label will be removed if there is new activity. The issue will be closed after 15 days if there is no new activity. Please apply keepalive label to exempt this Issue.

github-actions[bot] avatar Nov 14 '22 00:11 github-actions[bot]