open-telemetry / opentelemetry-collector

OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
4.53k stars 1.48k forks source link

Add capability to specify full exporter endpoint #6142

Closed sliat3pm closed 2 years ago

sliat3pm commented 2 years ago

Description

I'd like to use Google Cloud Trace as an exporter. But its endpoint has the following structure: https://cloudtrace.googleapis.com/v1/projects/{projectId}/traces As you can see /v1 and /traces are separated by /projects/{projectId}

At the same time, the current otc way of configuring allows specifying only the base URL (https://cloudtrace.googleapis.com). And /v1/traces is appended automatically.

Solution

Allow the end-user to specify the full endpoint URL for exporters. Do not append any extra path implicitly.

bogdandrutu commented 2 years ago

I am confused, https://cloudtrace.googleapis.com/v1/projects/{projectId}/traces I think this endpoint does not support OTLP, and has it's own resource path definition very established in Google APIs.

Which specific exporter are you trying to use?

dashpole commented 2 years ago

Google cloud trace doesn't support OTLP today. Are you trying to send Google Cloud Trace-formatted spans somewhere else? Or what are you trying to do?

This probably should also be moved to contrib.

sliat3pm commented 2 years ago

I am trying to send traces from opentelementry-collector to Google Cloud Trace. Is it possible?

dashpole commented 2 years ago

Yes, please use the googlecloud exporter in the contrib distribution. https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/googlecloudexporter#google-cloud-exporter. There is an example configuration there to get you started.

sliat3pm commented 2 years ago

Somehow I missed it. Thanks a lot. I believe we can close the issue.