This is mostly a port of @lvlcn-t's open telemetry implementation to the latest commit to prepare for implementing the metrics in primarily the traceroute check, which is tracked in #111.
From @lvlcn-t in #111 for reference:
I've started to implement the first step of completing this issue in feat/otel-provider. I've added a otel provider setup depending on the user's (startup) configuration.
To be able to keep the provider selection dynamic, I'm using the OpenTelemetry Protocol (OTLP) to communicate with the collector. This way, the user can choose the provider and the collector to use.
The following configuration options will be available for the user (naming is not final):
# Configures the telemetry exporter.
telemetry:
# The telemetry exporter to use.
# Options:
# grpc: Exports telemetry using OTLP via gRPC.
# http: Exports telemetry using OTLP via HTTP.
# stdout: Prints telemetry to stdout.
# noop | "": Disables telemetry.
exporter: grpc
# The address to export telemetry to.
url: localhost:4317
# The token to use for authentication.
# If the exporter does not require a token, this can be left empty.
token: ""
# The path to the tls certificate to use.
# To disable tls, either set this to an empty string or set it to insecure.
certPath: ""
Since the OpenTelemetry Protocol (OTLP) is a standard, the user can choose any collector that supports this protocol. The user can also choose to use the stdout exporter to see the traces in the console (for debugging purposes) or the noop exporter to disable the telemetry. If the user chooses an external collector, the user can also provide a bearer token for authentication. The user can also provide a path to a tls certificate to use for secure communication.
Next I'm wondering if I should already open the PR even though the actual traces are not yet implemented. This way we can split the issue into smaller parts and everyone can instrument one part of the codebase. What do you think?
Changes
For additional information look at the commits.
Tests done
Created a couple traces for testing with a local jaeger instance:
To run your very own jaeger instance for local testing you can use this command:
Motivation
Partially addresses #111
This is mostly a port of @lvlcn-t's open telemetry implementation to the latest commit to prepare for implementing the metrics in primarily the traceroute check, which is tracked in #111.
From @lvlcn-t in #111 for reference:
Changes
For additional information look at the commits.
Tests done
Created a couple traces for testing with a local jaeger instance:
To run your very own jaeger instance for local testing you can use this command:
TODO