-
Notifications
You must be signed in to change notification settings - Fork 327
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
Added support for opentelemetry trace exporter #977
Conversation
7039b41
to
e801d21
Compare
First test run was green, now something related to MongoDB broke. |
Hi guys, any progress/comments on this PR or did I DoS attack you? |
Don't worry, I'll take a hard look at everything you did tomorrow ;) |
Looking great, no major complaints for me. I'll have to dive a bit deeper though, so on monday expect either smaller feedback or just a straight up merge |
reporters/kamon-opentelemetry/src/main/scala/kamon/otel/SpanConverter.scala
Show resolved
Hide resolved
reporters/kamon-opentelemetry/src/main/resources/reference.conf
Outdated
Show resolved
Hide resolved
Other than those few small nitpicks, this is great. There's still work to do, but what is there is readable and well tested. |
cb27139
to
bd20789
Compare
bd20789
to
1c89af5
Compare
Yep, there's a few things that can be added in the continuation. That's why I added the notes in this PR on what is yet to be done. Also left a few TODOs in the code to mark where more features can be added. |
Thanks for the contribution! |
Any plans for when you'll do a new release? |
Now where would the fun be in just doing things on time? Jokes aside, thanks for the patience 🎉 |
Overview
This PR adds an exporter for exporting traces/spans according to OpenTelemetry Protocol (OTLP) as requested in #973.
The code has been tested against an instance of the OpenTelemetry Collector
What is not supported from the OTEL spec
What is not implemented in this first draft
Some things were left out for sake of getting something out there.
Support for custom trust store for managing TLS
The exporter supports HTTP (default) and HTTPS but there is no way to add custom trust store or keychains
No labels/tags/keyvalues are dropped
The spec allows for dropping meta-information in case if.
But dropping meta-information requires that the exporter notes how many were dropped.
So for sake of simplicity the exporter includes all environment/span tags
Assumptions made on the OTLP model
The data model for exporting spans looks like:
1- is 1-1
*- is one to many
So one
ExportServiceRequest
can have multipleResourceSpans
which in turn can have multipleInstrumentationLibrarySpans
which finally has multipleSpans
I've assumed that always is a single resource (i.e. the application itself) and there is only one instrumentation library (kamon) and all spans belong in that chain.
So the meta-information in the
Resource
belonging toResourceSpans
comes largely from optional Kamon env tags.The meta-information in the instrumentation library is info on Kamon.
Local testing
I've used the OTEL collector in a container and provided it with config to just print all traces it receives
otel-collector.yaml
Then just run this command (requires Docker)
Example printout from OTEL collector
Note the Resource labels as they're from the Kamon env tags apart from
telemetry.sdk.*
which we always add.The InstrumentationLibrary kamon 2.1.14 is the
InstrumentationLibrary
meta-info provided