Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Exporter.OpenTelemetryProtocol] Support for Compression #3961

Open
Kielek opened this issue Dec 1, 2022 · 2 comments
Open

[Exporter.OpenTelemetryProtocol] Support for Compression #3961

Kielek opened this issue Dec 1, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@Kielek
Copy link
Contributor

Kielek commented Dec 1, 2022

Feature Request

Supoort for the compresion env. vars in the OTLP exporter.
Specfication: https://github.com/open-telemetry/opentelemetry-specification/blob/0a4c6656d1ac1261cfe426b964fd63b1c302877d/specification/protocol/exporter.md?plain=1#L39-L41

Describe the solution you'd like:

Possibility to configure compression based on appropriate class properties and env. varriables - like in specification.

Describe alternatives you've considered.

N/A

Additional Context

Request from @otel0dotnet-atuo-instr slack channel https://cloud-native.slack.com/archives/C01NR1YLSE7/p1669828204249379

@Kielek Kielek added the enhancement New feature or request label Dec 1, 2022
@anchlovi
Copy link

+1 - request size grows quickly in high throughput environments

@djluck
Copy link

djluck commented Sep 20, 2024

As a workaround, you can enable compression for the GRPC-based client by adding grpc-internal-encoding-request to OtlpExporterOptions.Header:

AddOtlpExporter(x =>
{
    x.Endpoint = new Uri("http://localhost:4317");
    x.Headers = "grpc-internal-encoding-request=gzip";
}

This works as the Header collection is propagated to the GRPC Metadata collection. Metadata is used by the GrpcNetClient to set the compression algorithm: https://github.com/grpc/grpc-dotnet/blob/master/examples/Compressor/Client/Program.cs#L38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants