-
Notifications
You must be signed in to change notification settings - Fork 23
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
Support pushing traces to otel collector #261
Conversation
86ff3cb
to
566bf6d
Compare
c5aaf7a
to
391cfbb
Compare
.with(telemetry_layer) | ||
.init(); | ||
} else { | ||
tracing_subscriber::registry() |
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.
what is this doing? (when exporter is not being defined)
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.
The tracing package is being used for the standard logging since #250 - if tracing_host
is unset we ensure that the fmt_layer
is still applied so we get log output on stdout. Only if it's set we apply the telemetry_layer
as well which is sending to the collector
7d65cea
to
43afa41
Compare
limitador-server/src/main.rs
Outdated
.with_endpoint(format!("rpc://{}", config.tracing_address())) | ||
.with_protocol(Protocol::Grpc), |
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 think I'd want to align that with authorino's way of configuring...
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've had a look and this .with_protocol
doesn't actually effect the behaviour. Either we use .tonic()
and it's grpc, or we use .http()
and provide our choice of http client. For now I've moved to a --tracing-endpoint
option which contains scheme the same as authorino, but it won't use http if provided unless we check the scheme and configure an http client
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.
LGTM, modulo the unnecessary diffs, but I'll let you be the judge of their faith
This adds support to push traces to an otel collector, configured via new command line options,
--tracing-host
and--tracing-port
.Currently this is configured to use grpc without TLS however this could be added as a follow up.
Verification:
For this example I'm running Redis as the datastore to verify.
Run Redis service
Run Jaeger with OTLP
firefox -private-window "localhost:16686"
Build and run from this branch
Send Requests
See the spans for the requests under the
limitador-server
service in the jaeger ui: