-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OpenTelemetry integration: Allow exporting EXPLAIN plans as trace spans
This is an experimental feature that allows configuring the collector to send an OTel tracing span for each processed EXPLAIN plan with an associated "traceparent" query tag (e.g. set by sqlcommenter) to the configured OpenTelemetry endpoint. To configure the endpoint set the new config setting otel_exporter_otlp_endpoint / OTEL_EXPORTER_OTLP_ENDPOINT, with a endpoint string like "http://localhost:4318". The tracing span contains the runtime of the EXPLAIN plan, as determined from the logs, as well as a backlink to pganalyze as the "url.full" span attribute, to allow accessing the full details within the pganalyze app. Overall this aims to enable easy access of pganalyze for slow traces collected in an APM tool, and helps identify when the database was the bottleneck (and why). It requires the "traceparent" query tag to be present on logged EXPLAIN plans, e.g. added by using sqlcommenter within the application.
- Loading branch information
Showing
1,048 changed files
with
134,925 additions
and
53,277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.