feat: telemetry data export via a secure channel #8792
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR allows telemetry data (logs and spans) to be exported via a secure channel to the authority node.
This is the first step for exporting telemetry data via a secure channel, the next step will be to export it via the project node.
gRPC data interception
When a project is ready, the log and span exporters are set with a gRPC client which packs the gRPC requests into Ockam messages.
Those messages are sent to a
HttpForwarder
worker which deserializes the requests and forwards them to an Opentelemetry collector endpoint.Documentation
I started a
telemetry.md
document to describe the different options which can be used to export telemetry data.TcpTransport
The creation of a
TcpTransport
with theTcpTransport::create(ctx: &Context)
method now checks if the transport has not already been created. If it has been created, it returns the sameTcpTransport
instead of returning a new one which would have a new internal registry and potentially lose some data.This avoids the passing of both the
Context
and aTcpTransport
when creating theSecureClient
that will be used to send telemetry data.Dependencies upgrades
This PR also upgrades the
opentelemetry
crates since there were recent breaking changes and more are coming up.