New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

go.opentelemetry.io/collector/config/configgrpc

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

go.opentelemetry.io/collector/config/configgrpc

  • v0.119.0
  • Go
  • Socket score

Version published
Created
Source

gRPC Configuration Settings

gRPC exposes a variety of settings. Several of these settings are available for configuration within individual receivers or exporters. In general, none of these settings should need to be adjusted.

Client Configuration

Exporters leverage client configuration.

Note that client configuration supports TLS configuration, the configuration parameters are also defined under tls like server configuration. For more information, see configtls README.

  • balancer_name: Default before v0.103.0 is pick_first, default for v0.103.0 is round_robin. See issue. To restore the previous behavior, set balancer_name to pick_first.
  • compression: Compression type to use among gzip, snappy, zstd, and none.
  • endpoint: Valid value syntax available here
  • tls
  • headers: name/value pairs added to the request
  • keepalive
    • permit_without_stream
    • time
    • timeout
  • read_buffer_size
  • write_buffer_size
  • auth

Please note that per_rpc_auth which allows the credentials to send for every RPC is now moved to become an extension. Note that this feature isn't about sending the headers only during the initial connection as an authorization header under the headers would do: this is sent for every RPC performed during an established connection.

Example:

exporters:
  otlp:
    endpoint: otelcol2:55690
    auth:
      authenticator: some-authenticator-extension
    tls:
      ca_file: ca.pem
      cert_file: cert.pem
      key_file: key.pem
    headers:
      test1: "value1"
      "test 2": "value 2"

Compression Comparison

configgrpc_benchmark_test.go contains benchmarks comparing the supported compression algorithms. It performs compression using gzip, zstd, and snappy compression on small, medium, and large sized log, trace, and metric payloads. Each test case outputs the uncompressed payload size, the compressed payload size, and the average nanoseconds spent on compression.

The following table summarizes the results, including some additional columns computed from the raw data. The benchmarks were performed on an AWS m5.large EC2 instance with an Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz.

RequestCompressorRaw BytesCompressed bytesCompression ratioNs / opMb compressed / secondMb saved / second
lg_log_requestgzip515026219.6649231104.6199.29
lg_metric_requestgzip680020133.8351816131.23127.35
lg_trace_requestgzip920027034.0765174141.16137.02
md_log_requestgzip3632681.35376099.652.53
md_metric_requestgzip3201452.213014110.625.81
md_trace_requestgzip4512881.573827011.784.26
sm_log_requestgzip1661680.99305115.44-0.07
sm_metric_requestgzip1851421.30290556.371.48
sm_trace_requestgzip2332051.14334666.960.84
lg_log_requestsnappy515047510.8419152,689.302,441.25
lg_metric_requestsnappy680046614.5922663,000.882,795.23
lg_trace_requestsnappy920064414.2932812,804.022,607.74
md_log_requestsnappy3633001.21770.0471.4381.82
md_metric_requestsnappy3201621.98588.6543.66268.43
md_trace_requestsnappy4513301.37907.7496.86133.30
sm_log_requestsnappy1661840.90551.8300.83-32.62
sm_metric_requestsnappy1851541.20526.3351.5158.90
sm_trace_requestsnappy2332510.93682.1341.59-26.39
lg_log_requestzstd515022323.0917998286.14273.75
lg_metric_requestzstd680014447.2214289475.89465.81
lg_trace_requestzstd920020844.2317160536.13524.01
md_log_requestzstd3632611.391121632.369.09
md_metric_requestzstd3201452.21931834.3418.78
md_trace_requestzstd4513011.501258335.8411.92
sm_log_requestzstd1661651.011248213.300.08
sm_metric_requestzstd1851391.33882420.975.21
sm_trace_requestzstd2332031.151013422.992.96

Compression ratios will vary in practice as they are highly dependent on the data's information entropy. Compression rates are dependent on the speed of the CPU, and the size of payloads being compressed: smaller payloads compress at slower rates relative to larger payloads, which are able to amortize fixed computation costs over more bytes.

gzip is the only required compression algorithm required for OTLP servers, and is a natural first choice. It is not as fast as snappy, but achieves better compression ratios and has reasonable performance. If your collector is CPU bound and your OTLP server supports it, you may benefit from using snappy compression. If your collector is CPU bound and has a very fast network link, you may benefit from disabling compression, which is the default.

Server Configuration

Receivers leverage server configuration.

Note that transport configuration can also be configured. For more information, see confignet README.

FAQs

Package last updated on 04 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc