-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit sets up some basic infrastructure to emit traces from our application code using OpenTelemetry. - Package `internal/telemetry` provides the `TracerProvider` function aiming to simplify the configuration of new tracer providers from different application binaries or entry pointes. - Enduro (`main.go`) now uses `TracerProvider` to set up the tracer and emit two spans for the Enduro and Storage client handlers. - Grafana Agent (telemetry collector) and Grafana Tempo (traces store) are deployed in the development environment (`hack/kube/components/dev`). Grafana is not deployed as part of this work so we can't visualize traces just yet, but Tempo has been configured to log stored spans to the standard error stream, making posisble to confirm that our application is successfully producing traces, e.g.: ``` level=info ts=2024-01-09T12:07:45.804618153Z caller=distributor.go:616 span_db_driver=mysql span_name=enduro-db-ping span_duration_seconds=0.001049695 span_kind=SPAN_KIND_INTERNAL span_status=STATUS_CODE_UNSET msg=received spanid=f17dcdad7215ff3c traceid=a73d08ea8c72405c1cc7f288333e7b35 level=info ts=2024-01-09T12:07:45.804706331Z caller=distributor.go:616 span_db_driver=mysql span_name=storage-db-ping span_duration_seconds=0.000889422 span_kind=SPAN_KIND_INTERNAL span_status=STATUS_CODE_UNSET msg=received spanid=dec224ffda3ad5a6 traceid=c3a269bedf426cf60b5530c66dcf1fd5 ```
- Loading branch information
Showing
14 changed files
with
546 additions
and
125 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
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.