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

OpenCensus Metrics bridge doesn't work with the OpenTelemetry prometheus exporter #2204

Closed
dashpole opened this issue Aug 27, 2021 · 3 comments · Fixed by #3541
Closed

OpenCensus Metrics bridge doesn't work with the OpenTelemetry prometheus exporter #2204

dashpole opened this issue Aug 27, 2021 · 3 comments · Fixed by #3541
Assignees
Labels
area:metrics Part of OpenTelemetry Metrics enhancement New feature or request pkg:bridges Related to a bridge package pkg:exporter:prometheus Related to the Prometheus exporter package

Comments

@dashpole
Copy link
Contributor

Problem Statement

I'd like to be able to send metrics from OpenCensus and OpenTelemetry SDKs to the same prometheus endpoint. This will allow me to migrate my OpenCensus metrics to OpenTelemetry over time.

Proposed Solution

Still investigating

Additional Context

From open-telemetry/opentelemetry-collector#3816

@dashpole thanks for the suggestion! I tried the bridge, but ran into two problems:

Any idea where I'm going wrong?

@dashpole dashpole added enhancement New feature or request pkg:bridges Related to a bridge package labels Aug 27, 2021
@dashpole dashpole self-assigned this Aug 27, 2021
@bogdandrutu
Copy link
Member

This one blocks collector transition as well. Consider to prioritize this.

@dashpole
Copy link
Contributor Author

dashpole commented Apr 8, 2022

Agreed. Once the SDK is rewritten to be spec-compliant, I'll make sure the prometheus exporter works well with the otel SDK. I'll also want to make sure the prometheus exporter for go is compliant with the prom <-> otlp spec I wrote.

@MrAlias MrAlias added area:metrics Part of OpenTelemetry Metrics blocked:design Waiting on design work to be completed before implementation can start. labels May 3, 2022
@MrAlias MrAlias added the pkg:exporter:prometheus Related to the Prometheus exporter package label Oct 20, 2022
@dashpole
Copy link
Contributor Author

Once #3541 lands, the following will work to use the OpenCensus bridge with the prometheus exporter:

exporter, err := prometheus.New()
// handle err
// Register the OpenCensus producer with the Prometheus exporter
exporter.RegisterProducer(opencensus.NewMetricProducer())
provider := metric.NewMeterProvider(metric.WithReader(exporter))
// use meter provider

@MrAlias MrAlias moved this from Todo to In Progress in Go: Metric SDK (Beta) Dec 19, 2022
@MrAlias MrAlias added this to the Metric v0.35.0 milestone Dec 19, 2022
Repository owner moved this from In Progress to Done in Go: Metric SDK (Beta) Dec 19, 2022
@MrAlias MrAlias removed the blocked:design Waiting on design work to be completed before implementation can start. label Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metrics Part of OpenTelemetry Metrics enhancement New feature or request pkg:bridges Related to a bridge package pkg:exporter:prometheus Related to the Prometheus exporter package
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants