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

Implement support for exporting metrics to stackdriver #10

Open
thomaseizinger opened this issue Sep 8, 2023 · 6 comments
Open

Implement support for exporting metrics to stackdriver #10

thomaseizinger opened this issue Sep 8, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@thomaseizinger
Copy link

As far as I can tell, exporting metrics via opentelemetry-stackdriver is not (yet) supported. Opening this issue to coordinate its implementation.

@cijothomas
Copy link
Member

Is it needed or the native OTLP capability is sufficient? https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/otlp#otlp-metrics

@thomaseizinger
Copy link
Author

Unfortunately, GCP does not support running the OpsAgent on container-optimised OS so we can't use the OTLP exporter :(

@cijothomas
Copy link
Member

Got it. Is the current crate supported by Google? I am asking because in other languages, dedicated exporters are not supported by Google (https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.Exporter.Stackdriver#stackdriver-exporter-for-opentelemetry-net) and is usually unmaintained...

@thomaseizinger
Copy link
Author

I am not affiliated with this crate in any way, just a user myself but I think it is not officially supported.

@djc
Copy link
Contributor

djc commented Sep 11, 2023

The crate is not supported by Google, but we as users are maintaining it. @thomaseizinger happy to review a PR!

@thomaseizinger
Copy link
Author

@thomaseizinger happy to review a PR!

I'll see what I can do. We are first integrating structured logging. Metrics will come after that :)

@TommyCpp TommyCpp added the enhancement New feature or request label Sep 26, 2023
@cijothomas cijothomas transferred this issue from open-telemetry/opentelemetry-rust Nov 16, 2023
hdost pushed a commit to open-telemetry/opentelemetry-rust that referenced this issue Nov 19, 2023
Fixes #1336

As per the
[specs](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.25.0/specification/protocol/exporter.md#specifying-headers-via-environment-variables),
the custom headers for OTLP exporter can be specified through env
variables - `OTEL_EXPORTER_OTLP_HEADERS`,
`OTEL_EXPORTER_OTLP_TRACES_HEADERS`,
`OTEL_EXPORTER_OTLP_METRICS_HEADERS`.
This PR completes the work already done in PR
#1290 adding support for tonic metadata
To reproduce the same behavior as http exporter, the env-variable takes
precedence (as discussed in
open-telemetry/opentelemetry-rust-contrib#10)

* Move common code for http and tonic exporters in `exporter/mod.rs`
(function to parse header from string and test helper to run tests with
isolated env variables)
I wanted to minimize the changes but maybe it should be a good idea to
use a crate like https://crates.io/crates/temp-env for environment
related testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants