-
Notifications
You must be signed in to change notification settings - Fork 47
Add open telemetry and local development helpers #231
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
base: master
Are you sure you want to change the base?
Conversation
add opentelemetry metrics, logs and traces
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.
adapter between flask app global config and telemetry config.
|
I'm trying to run this PR to test but I'm getting the following error that's preventing anything from starting. Edit: I think the issue is in |
|
After adding a temporary workaround for the logging issue I still can't get OTS to start. I've attached a debug log with several errors. |
|
fixed the missing settings issue. Thanks for pointing it out. Re the errors you're seeing.
How are you running the stack? It looks like you're creating venv and |
|
The commit you just pushed allows OTS to start now. I haven't installed OpenTelemetry yet. I didn't change my OTS config but the new OpenTelemetry feature is enabled for me be default. Can you please make it disabled by default? I also saw a new error. Looks like the Babel extension isn't being loaded. |
|
Actually, it looks more like your OTS_RABBITMQ_USERNAME is not set in config.yml. Can reproduce if i remove OTS_RABBITMQ_USERNAME from config.yml. My last commit 5427dd9 fixes this. |
|
I mistakenly removed babel.init_app from app.py in a merge. Fixed now. |
OpenTelemetry provides code instrumentation and a protocol for emitting logs, traces and metrics to a remote collector endpoint of the server operator's choice (compatible with Grafana stack, SigNoz, OpenObserve, etc...)
This PR adds first, rough implementation.
Changes:
dev.shAspire dashboard for OTel collector and display. chosen because its a single container and simplest for local dev.
The
telemetryfolder uses it's own configuration structures to decouple from Flask config object. Flask's app global config couples everything together and prevents dependency injection, so i wanted to start moving off this. Ideally we'd use pydantic or similar, but dataclass for now. If you'd prefer this module to use flask app config, i can change.Let me know if you need this PR split up, includes a few changes.
Logs:



Traces:
Metrics: