-
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 <ahuja.aditi@gmail.com>
Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com>
Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com>
Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com>
Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com>
Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com>
Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com>
Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com>
Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com>
Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com>
Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com>
Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com>
Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com>
Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com>
Signed-off-by: Matej Gera <matejgera@gmail.com>
Signed-off-by: Matej Gera <matejgera@gmail.com>
Signed-off-by: Matej Gera <matejgera@gmail.com>
Signed-off-by: Matej Gera <matejgera@gmail.com>
Signed-off-by: Matej Gera <matejgera@gmail.com>
Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com>
d0b558c
to
bf311ad
Compare
Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com>
@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 <aditi.ahuja@couchbase.com> * added jaeger exporter Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * draft: tracing test Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * minor refactor and cleanup Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * created package tracing/otlp Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * minor refactor Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * draft: added some more config options for jaeger Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * draft: extended e2e test Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * draft: added OTLP GRPC options Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * minor fixes; temp prints Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * refactor: removed OT code, changed tag parsing to OTel tags Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * jaeger refactor; minor updates Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * jaeger: added some more config options Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * otlp: added retry options Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * organizing and pruning Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * added TLS config for OTLP Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * draft: temp test fix for CI Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * added unit tests for jaeger Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * draft: added sampler types to jaeger Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * replaced objstore with exthttp Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * draft: test fixes Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * added jaeger remote sampler Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * draft: reverted E2E test fix Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * lint and doc test fixes Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * minor refactor for OTLP Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * jaeger: modified sampler selection Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * review fixes Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * draft: jaeger rate limiting sampler added Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * added OTLP unit tests; minor refactor Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * minor review fixes Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * draft: rate limiting sampler implementation Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * review fixes Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * removed OT tracer struct Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * Use service name in resource Signed-off-by: Matej Gera <matejgera@gmail.com> * Fix tracing E2E test Signed-off-by: Matej Gera <matejgera@gmail.com> * Adjust trace ID extraction for exemplars Signed-off-by: Matej Gera <matejgera@gmail.com> * Add OTLP docs and adjust Signed-off-by: Matej Gera <matejgera@gmail.com> * Add CHANGELOG Signed-off-by: Matej Gera <matejgera@gmail.com> * review fixes Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> * draft: updated E2E tests Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> Signed-off-by: Aditi Ahuja <aditi.ahuja@couchbase.com> Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com> Signed-off-by: Matej Gera <matejgera@gmail.com> Co-authored-by: Matej Gera <matejgera@gmail.com> Signed-off-by: utukj <utukphd@gmail.com>
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