ClickStack uses the OpenTelemetry standard for collecting telemetry data (logs and traces). Traces are auto-generated with automatic instrumentation, so manual instrumentation isn’t required to get value out of tracing. This guide integrates:Documentation Index
Fetch the complete documentation index at: https://private-7c7dfe99-page-updates.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
- Logs
- Metrics
- Traces
Getting started
Install ClickStack OpenTelemetry instrumentation package
Use the following command to install the ClickStack OpenTelemetry package.opentelemetry-bootstrap tool that comes with the OpenTelemetry Python SDK to scan your application packages and generate the list of available libraries.
Configure environment variables
Afterwards you’ll need to configure the following environment variables in your shell to ship telemetry to ClickStack via the OpenTelemetry collector:- Managed ClickStack
- ClickStack Open Source
OTEL_SERVICE_NAME environment variable is used to identify your service in the HyperDX app, it can be any name you want.
Run the application with OpenTelemetry Python agent
Now you can run the application with the OpenTelemetry Python agent (opentelemetry-instrument).
If you’re using Gunicorn, uWSGI or uvicorn
In this case, the OpenTelemetry Python agent will require additional changes to work.
To configure OpenTelemetry for application servers using the pre-fork web server mode, make sure to call the configure_opentelemetry method within the post-fork hook.
- Gunicorn
- uWSGI
- uvicorn
Advanced configuration
Network capture
By enabling network capture features, developers gain the capability to debug HTTP request headers and body payloads effectively. This can be accomplished simply by settingHYPERDX_ENABLE_ADVANCED_NETWORK_CAPTURE flag to 1.
Troubleshooting
Logs not appearing due to log level
By default, OpenTelemetry logging handler useslogging.NOTSET level which
defaults to WARNING level. You can specify the logging level when you create a
logger: