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 metric exporter bridge #1444

Merged
merged 3 commits into from
Mar 11, 2021

Conversation

dashpole
Copy link
Contributor

@dashpole dashpole commented Jan 8, 2021

Fixes #93

This allows wrapping an OpenTelemetry exporter so that it can be used with OpenCensus. This is useful to facilitate migrations from OpenCensus to OpenTelemetry, as it would allow using a mix of OpenCensus and OpenTelemetry APIs in code (and libraries), while sending all telemetry to a single exporter.

Everything was straightforward to map, except the data points themselves. To do that, I ended up having to implement custom Aggregations based on the data point type.

I also need to do an audit of OpenCensus functionality that is "dropped" when using the bridge and document it. Thus far, I know it drops Summary data points, exemplars, and some types of metric descriptors. I might do that in a follow-up.

@codecov
Copy link

codecov bot commented Jan 11, 2021

Codecov Report

Merging #1444 (93877af) into main (77aa218) will increase coverage by 0.3%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #1444     +/-   ##
=======================================
+ Coverage   77.3%   77.7%   +0.3%     
=======================================
  Files        128     130      +2     
  Lines       6796    6924    +128     
=======================================
+ Hits        5256    5382    +126     
- Misses      1290    1292      +2     
  Partials     250     250             
Impacted Files Coverage Δ
bridge/opencensus/aggregation.go 100.0% <100.0%> (ø)
bridge/opencensus/exporter.go 100.0% <100.0%> (ø)
exporters/otlp/otlpgrpc/connection.go 86.9% <0.0%> (-1.9%) ⬇️

@dashpole dashpole force-pushed the oc_metrics_bridge branch 5 times, most recently from f69a78f to 11314d9 Compare January 11, 2021 21:06
bridge/opencensus/aggregation.go Outdated Show resolved Hide resolved
bridge/opencensus/aggregation.go Outdated Show resolved Hide resolved
@dashpole
Copy link
Contributor Author

Friendly ping for reviews!

Base automatically changed from master to main January 29, 2021 19:39
@dashpole
Copy link
Contributor Author

rebased again. @jmacd I think you said you wanted to take a look at this.

@MrAlias MrAlias merged commit a1539d4 into open-telemetry:main Mar 11, 2021
@dashpole dashpole deleted the oc_metrics_bridge branch March 11, 2021 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shim: OpenCensus Shim
4 participants