-
Notifications
You must be signed in to change notification settings - Fork 27
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
THREESCALE-9682: Add support for OpenTelemetry #405
Conversation
CONFIG_OPENTELEMETRY_ENABLED
Is it possible by any chance to test that the endpoint is operational with the said env variable? Maybe not, just asking. |
I don't think there's a way other than pinging the endpoint host and port directly. |
Fair enough. But how do we know whether this fixes the actual JIRA issue THREESCALE-9669? |
The issue is not only about apisonator. As I understood it, the only apisonator work required is:
So there's no need to check any endpoint AFAIK. @eguzki ? |
That's the one jira issue describing the work being done here: https://issues.redhat.com/browse/THREESCALE-9682 |
LGTM I left one suggestion, but it's a nit. |
It would be nice to drop an snapshot from jaeger UI with the trace being recorded from backend listener |
lib/3scale/backend.rb
Outdated
@@ -53,6 +53,7 @@ | |||
require '3scale/backend/failed_jobs_scheduler' | |||
require '3scale/backend/transactor' | |||
require '3scale/backend/listener' | |||
require '3scale/backend/opentelemetry' |
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.
This is only executed from the backend listener?
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'd say it only makes sense for the listener, which is who listens to sinatra routes
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 worker is also importing this file.
What about lib/3scale/backend/server.rb
?? I did not try myself, though. Looks like lib/3scale/backend/listener.rb
is being imported by both worker and listener 🤷
Not important, though.. up to you.. not a request for change. The worker will not have the opt-in switch enabled, so it is harmless.
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.
Fixed: a45900b
Co-authored-by: Eguzki Astiz Lezaun <[email protected]>
This adds OpenTelemetry instrumentation for Sinatra in Apisonator.
How to verify:
OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
and the new varCONFIG_OPENTELEMETRY_ENABLED=true
.CONFIG_OPENTELEMETRY_ENABLED
or setting it tofalse
disables the metrics and you can't see the requests in Jaeger.Jira Issue:
https://issues.redhat.com/browse/THREESCALE-9682