-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Verify OpenCensus bridge is compatible with the specificaiton #4514
Comments
Trace Bridge
It does not depend on the trace SDK: opentelemetry-go/bridge/opencensus/go.mod Lines 5 to 12 in 60666c5
The bridge will accept a TracerProvider, but does not expose any OpenTelemetry API interfaces in its public API.
The InstallTraceBridge() function (added in #4567) is as simple as we could possibly get.
The bridge does this, as tested here: https://github.com/open-telemetry/opentelemetry-go/blob/main/bridge/opencensus/test/bridge_test.go#L32
The bridge is in its own module, and thus is fully optional.
The current API, NewTracer, accepts an OpenTelemetry Tracer, which it uses to record spans from OpenCensus:
After #4567, this will still be the case in InstallTraceBridge: https://github.com/open-telemetry/opentelemetry-go/pull/4567/files#diff-ee40e63756bf77fde5a66bcf047e3bee7ae65207d633d2a4dc9139a8b7d6362fR40
I don't believe this applies to Go.
The bridge span wrapper delegates all OpenCensus calls to the OpenTelemetry tracer: opentelemetry-go/bridge/opencensus/internal/span.go Lines 43 to 45 in 60666c5
The OpenCensus Trace Bridge is compliant with the specification. |
Metrics Bridge
opencensus.NewMetricProducer returns a metric.Producer: https://github.com/open-telemetry/opentelemetry-go/blob/main/bridge/opencensus/metric.go#L37
opentelemetry-go/bridge/opencensus/metric.go Lines 44 to 58 in 60666c5
The bridge is in its own go module, which makes it optional for users to use.
OpenCensus does not depend on OpenTelemetry
No changes were required to OpenCensus for this bridge.
ManualReader, PeriodicReader, and the prometheus exporter all accept metric.Producer as a source of external metrics.
We do not support summaries today. #4571 Gauges, Counters, Cumulative Histograms: opentelemetry-go/bridge/opencensus/internal/ocmetric/metric.go Lines 69 to 78 in 60666c5
We do not support exemplars today: #4572
We discard the resource attached to OpenCensus, since the bridge does not return a resource. The OTel metrics SDK inserts the resource provided during initialization, or falls back to the default.
We do add a scope with a name, but do not add a version: #4573
The OpenCensus bridge can be passed to PeriodicReader, ManualReader, and the Prometheus exporter. |
Based on the above, I think the bridge is compatible with the specification. If someone else can review my analysis above, I think we can close. |
To my understanding we are compliant with the specification. However, I created #4729. |
Specification: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.25.0/specification/compatibility/opencensus.md
Create an issue for anything not compliant.
The text was updated successfully, but these errors were encountered: