orb-community/orb

Sink endpoint incorrectly set to api/v2/otlp/v1/metrics/v1/metrics for token based auth sink

Closed this issue · 2 comments

Describe the bug
A clear and concise description of what the bug is.
the endpoint has double /v1/metrics ; see title

To Reproduce
Steps to reproduce the behavior:

  1. Deploy orb components w tag: "0.30.0" and dependencies version: "1.0.54" which contains the code from ns1 dev on this pr #3061
  2. Setup otlp sink with format as in below format and the orig endpoint is e.g. https://xxx.com/api/v2/otlp/v1/metrics
Screenshot 2024-10-18 at 4 22 32 PM json from UI:

authentication:
scheme: Api-Token
token: ""
type: bearertokenauth
exporter:
endpoint: https://xxx.com/api/v2/otlp
3. sink setup successfully but it will have error msg like this
{"app":"opentelemetry","pod":"otel-99fb7a47-db97-4613-a5ac-541f9b983b87-66d9469fb5-2ntkc","_entry":"2024-08-23T17:01:14.951Z\terror\texporterhelper/retry_sender.go:126\tExporting failed. The error is not retryable. Dropping data.\t{"kind": "exporter", "data_type": "metrics", "name": "otlphttp", "error": "Permanent error: error exporting items, request to https://xxx.com/api/v2/otlp/v1/metrics/v1/metrics responded with HTTP Status Code 404", "dropped_items": 45}\n"}
4. I work around this issue by omit /v1/metrics so entering the endpoint as https://xxx.com/api/v2/otlp then metric sends fine
Expected behavior
A clear and concise description of what you expected to happen.
the endpoint should only contains 1x /v1/metrics : https://xxx.com/api/v2/otlp/v1/metrics/v1/metrics

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Hi @lixinchina1, otlphttpexporter from oteltelemetry collector appends /v1/metrics to the provided endpoint itself so it's seems like expected behaviour and I believe endpoint you're trying to configure shouldn't contain it, ref: https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter

hey Michal,

I see. I got the /v1/metrics suffix from customer when they provide the url. I will make a note for my team for future reference, many thx!