Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

Upgrade to use OpenTelemetry version 0.13.0 #95

Merged
merged 1 commit into from
Oct 16, 2020

Conversation

seh
Copy link
Contributor

@seh seh commented Oct 13, 2020

Adapt the Honeycomb OpenTelemetry exporter to use the OpenTelemetry opentelemetry-go and opentelemetry-go-contrib libraries as of their coordinated releases at version 0.13.0.

Update the example client and server programs to demonstrate use of trace propagation, including baggage. For the server program, augment it to accept its listening address and port as command-line flags, use an HTTP handler multiplexer to accommodate additional URL paths, and to shut down cleanly upon receiving INT and TERM signals.

While we're here, address all complaints from golint, go vet, and staticcheck.

@seh
Copy link
Contributor Author

seh commented Oct 13, 2020

Note that open-telemetry/opentelemetry-go-contrib#399 tracks the less-than-ideal span hierarchy created by the example client's HTTP requests.

global.SetTextMapPropagator(otel.NewCompositeTextMapPropagator(
propagators.TraceContext{},
propagators.Baggage{}))
return bsp.Shutdown
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See open-telemetry/opentelemetry-specification#1073 for how this situation might change soon. My comment open-telemetry/opentelemetry-specification#1073 (comment) addresses my use of NewBatchSpanProcessor above, as opposed to using WithBatcher.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open-telemetry/opentelemetry-go#1227 just merged, allowing shutting down a TracerProvider, in trun shutting down its registered span processors. Once we have release available that includes that new method, I'll propose an update to simplify this example.

Copy link
Contributor

@MikeGoldsmith MikeGoldsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fantastic, thanks @seh!

@MikeGoldsmith
Copy link
Contributor

Just had to close/re-open to trigger CI 👍

@MikeGoldsmith MikeGoldsmith merged commit 961b435 into honeycombio:main Oct 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants