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

Add opencensus binary propagation to bridge #1334

Merged
merged 5 commits into from
Nov 16, 2020

Conversation

dashpole
Copy link
Contributor

Issue: #93

The OpenCensus ocgrpc plugin has hardcoded the use of its binary propagation format, under the "grpc-trace-bin" key.

In order to migrate from ocgrpc to otelgrpc, users need to be able to use the opencensus binary propagation format in opentelemetry. This PR implements the TextMapCarrier interface using the opencensus binary propagation libraries.

This PR also extracts common functions into a utils package, fixes the import comments on packages, and makes the go version used (1.14) consistent with the rest of the repository.

@codecov
Copy link

codecov bot commented Nov 13, 2020

Codecov Report

Merging #1334 (42391e4) into master (73a0539) will increase coverage by 0.0%.
The diff coverage is 92.6%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1334   +/-   ##
======================================
  Coverage    77.4%   77.5%           
======================================
  Files         123     125    +2     
  Lines        6067    6090   +23     
======================================
+ Hits         4697    4720   +23     
- Misses       1116    1119    +3     
+ Partials      254     251    -3     
Impacted Files Coverage Δ
bridge/opencensus/bridge.go 84.9% <50.0%> (+4.0%) ⬆️
bridge/opencensus/binary/binary.go 91.3% <91.3%> (ø)
bridge/opencensus/utils/utils.go 100.0% <100.0%> (ø)
sdk/trace/batch_span_processor.go 74.5% <0.0%> (-4.0%) ⬇️

bridge/opencensus/binary/binary.go Outdated Show resolved Hide resolved
bridge/opencensus/doc.go Show resolved Hide resolved
bridge/opencensus/utils/utils.go Outdated Show resolved Hide resolved
@dashpole
Copy link
Contributor Author

I don't think the failure is related

go test ./... + race in ./exporters/otlp
--- FAIL: TestNewExporter_collectorConnectionDiesThenReconnects (0.54s)
    otlp_integration_test.go:380: 
        	Error Trace:	otlp_integration_test.go:380
        	Error:      	Received unexpected error:
        	            	rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:43837: connect: connection refused"
        	Test:       	TestNewExporter_collectorConnectionDiesThenReconnects

@MrAlias
Copy link
Contributor

MrAlias commented Nov 16, 2020

I don't think the failure is related
...

Agreed.

@MrAlias MrAlias merged commit bbc9465 into open-telemetry:master Nov 16, 2020
dashpole added a commit to dashpole/opentelemetry-go that referenced this pull request Nov 19, 2020
dashpole added a commit to dashpole/opentelemetry-go that referenced this pull request Nov 20, 2020
MrAlias added a commit that referenced this pull request Nov 20, 2020
AzfaarQureshi pushed a commit to open-o11y/opentelemetry-go that referenced this pull request Dec 3, 2020
* add opencensus binary propagation bridge

* Update bridge/opencensus/binary/binary.go

Co-authored-by: Tyler Yahn <[email protected]>

* Update bridge/opencensus/doc.go

Co-authored-by: Tyler Yahn <[email protected]>

* address comments

Co-authored-by: Tyler Yahn <[email protected]>
AzfaarQureshi pushed a commit to open-o11y/opentelemetry-go that referenced this pull request Dec 3, 2020
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.

3 participants