-
Notifications
You must be signed in to change notification settings - Fork 2.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
Migrating Jaeger tracing from OpenTracing to OpenTelemetry; Add OTLP exporter #5411
Conversation
7a436e5
to
16d3134
Compare
@matej-g could you please review my current progress, when you're free.
TODO:
Thanks! |
pkg/tracing/client/factory.go
Outdated
) | ||
|
||
type TracingConfig struct { | ||
Type TracingProvider `yaml:"type"` | ||
Config interface{} `yaml:"config"` | ||
} | ||
|
||
// NewOTELTracer returns an OTLP exporter based tracer. | ||
func NewOTELTracer(ctx context.Context, logger log.Logger) trace.Tracer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So my thought was to simply add a new TracingProvider
const to the list we have above, simply named OTLP
. It would be yet another package under tracing
directory, just as we have jaeger
, google_cloud
etc.
Then, an OTLP exporter should be simply one of the switch
cases in the factory function below. We should also probably take some config from YAML, same we do for other tracing provider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created a new package otlp
in a recent commit with some options for configuration. I will try to add some more config options if possible.
Please let me know what you think.
Thank you @metonymic-smokey! I think this is going in the right direction, I provided some feedback which will hopefully unblock you (if not feel free to ask for more details). As for checking traces in E2E test, we could simply do a HTTP request to Jaeger and parse the reply for the trace data we expect. You can take a look at an example from our other project here: https://github.com/observatorium/api/blob/main/test/e2e/traces_test.go#L195 |
73f9ab2
to
1a8134b
Compare
e9e42d2
to
96d2ccb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice progress! 💪 I added a few more hints for OTLP exporter.
1292434
to
d9572bd
Compare
Signed-off-by: Aditi Ahuja <[email protected]>
Signed-off-by: Aditi Ahuja <[email protected]>
Signed-off-by: Aditi Ahuja <[email protected]>
Signed-off-by: Aditi Ahuja <[email protected]>
Signed-off-by: Aditi Ahuja <[email protected]>
Signed-off-by: Aditi Ahuja <[email protected]>
Signed-off-by: Aditi Ahuja <[email protected]>
Signed-off-by: Aditi Ahuja <[email protected]>
Signed-off-by: Aditi Ahuja <[email protected]>
Signed-off-by: Aditi Ahuja <[email protected]>
Signed-off-by: Aditi Ahuja <[email protected]>
Signed-off-by: Aditi Ahuja <[email protected]>
Signed-off-by: Aditi Ahuja <[email protected]>
Signed-off-by: Aditi Ahuja <[email protected]>
Signed-off-by: Matej Gera <[email protected]>
Signed-off-by: Matej Gera <[email protected]>
Signed-off-by: Matej Gera <[email protected]>
Signed-off-by: Matej Gera <[email protected]>
Signed-off-by: Matej Gera <[email protected]>
Signed-off-by: Aditi Ahuja <[email protected]>
d0b558c
to
bf311ad
Compare
Signed-off-by: Aditi Ahuja <[email protected]>
@GiedriusS @matej-g i've updated the E2E tests and looks like they all pass :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…exporter (thanos-io#5411) * draft: standalone OTLP tracer Signed-off-by: Aditi Ahuja <[email protected]> * added jaeger exporter Signed-off-by: Aditi Ahuja <[email protected]> * draft: tracing test Signed-off-by: Aditi Ahuja <[email protected]> * minor refactor and cleanup Signed-off-by: Aditi Ahuja <[email protected]> * created package tracing/otlp Signed-off-by: Aditi Ahuja <[email protected]> * minor refactor Signed-off-by: Aditi Ahuja <[email protected]> * draft: added some more config options for jaeger Signed-off-by: Aditi Ahuja <[email protected]> * draft: extended e2e test Signed-off-by: Aditi Ahuja <[email protected]> * draft: added OTLP GRPC options Signed-off-by: Aditi Ahuja <[email protected]> * minor fixes; temp prints Signed-off-by: Aditi Ahuja <[email protected]> * refactor: removed OT code, changed tag parsing to OTel tags Signed-off-by: Aditi Ahuja <[email protected]> * jaeger refactor; minor updates Signed-off-by: Aditi Ahuja <[email protected]> * jaeger: added some more config options Signed-off-by: Aditi Ahuja <[email protected]> * otlp: added retry options Signed-off-by: Aditi Ahuja <[email protected]> * organizing and pruning Signed-off-by: Aditi Ahuja <[email protected]> * added TLS config for OTLP Signed-off-by: Aditi Ahuja <[email protected]> * draft: temp test fix for CI Signed-off-by: Aditi Ahuja <[email protected]> * added unit tests for jaeger Signed-off-by: Aditi Ahuja <[email protected]> * draft: added sampler types to jaeger Signed-off-by: Aditi Ahuja <[email protected]> * replaced objstore with exthttp Signed-off-by: Aditi Ahuja <[email protected]> * draft: test fixes Signed-off-by: Aditi Ahuja <[email protected]> * added jaeger remote sampler Signed-off-by: Aditi Ahuja <[email protected]> * draft: reverted E2E test fix Signed-off-by: Aditi Ahuja <[email protected]> * lint and doc test fixes Signed-off-by: Aditi Ahuja <[email protected]> * minor refactor for OTLP Signed-off-by: Aditi Ahuja <[email protected]> * jaeger: modified sampler selection Signed-off-by: Aditi Ahuja <[email protected]> * review fixes Signed-off-by: Aditi Ahuja <[email protected]> * draft: jaeger rate limiting sampler added Signed-off-by: Aditi Ahuja <[email protected]> * added OTLP unit tests; minor refactor Signed-off-by: Aditi Ahuja <[email protected]> * minor review fixes Signed-off-by: Aditi Ahuja <[email protected]> * draft: rate limiting sampler implementation Signed-off-by: Aditi Ahuja <[email protected]> * review fixes Signed-off-by: Aditi Ahuja <[email protected]> * removed OT tracer struct Signed-off-by: Aditi Ahuja <[email protected]> * Use service name in resource Signed-off-by: Matej Gera <[email protected]> * Fix tracing E2E test Signed-off-by: Matej Gera <[email protected]> * Adjust trace ID extraction for exemplars Signed-off-by: Matej Gera <[email protected]> * Add OTLP docs and adjust Signed-off-by: Matej Gera <[email protected]> * Add CHANGELOG Signed-off-by: Matej Gera <[email protected]> * review fixes Signed-off-by: Aditi Ahuja <[email protected]> * draft: updated E2E tests Signed-off-by: Aditi Ahuja <[email protected]> Signed-off-by: Aditi Ahuja <[email protected]> Signed-off-by: Aditi Ahuja <[email protected]> Signed-off-by: Matej Gera <[email protected]> Co-authored-by: Matej Gera <[email protected]> Signed-off-by: utukj <[email protected]>
part of fixing #1972
Changes
This PR provides two changes that brings us closer to closing the gap between migrating from OpenTracing to OpenTelemetry, in particular:
a) This moves Jaeger client from OpenTracing to OpenTelemetry, without breaking changes. This means users can keep using their existing tracing configuration (some options will now not have any effect, but these are the ones that are obsolete after move to OTEL; read more in the updated documentation in the PR)
b) This adds the OTLP exporter, meaning now users will be able to leverage this protocol as well, with support of both gRPC and HTTP client.
Verification