Skip to content

feat(opentelemetry sink): add gRPC transport support#24972

Open
thomasqueirozb wants to merge 69 commits into
masterfrom
feat/opentelemetry-sink-grpc
Open

feat(opentelemetry sink): add gRPC transport support#24972
thomasqueirozb wants to merge 69 commits into
masterfrom
feat/opentelemetry-sink-grpc

Conversation

@thomasqueirozb

@thomasqueirozb thomasqueirozb commented Mar 20, 2026

Copy link
Copy Markdown
Member

Summary

Adds gRPC transport to the OpenTelemetry sink, complementing the existing HTTP transport. The sink now supports protocol.type = "grpc" using tonic over HTTP/2, with support for TLS, compression, batching, and retry logic matching the source's gRPC implementation.

Vector configuration

sinks:
  otel_grpc:
    type: opentelemetry
    inputs: [...]
    protocol:
      type: grpc
      endpoint: http://otel-collector:4317

How did you test this PR?

  • Unit tests in src/sinks/opentelemetry/grpc.rs covering config parsing and URI scheme handling
  • E2e test matrix extended with vector_grpc.yaml config (telemetrygen → OTel collector → Vector gRPC sink → OTel collector sink → file)
  • Integration test in src/sinks/opentelemetry/integration_tests.rs (gated on opentelemetry-integration-tests feature) that sends OTLP log events to a live OTel collector via gRPC

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

@github-actions github-actions Bot added the domain: sinks Anything related to the Vector's sinks label Mar 20, 2026
@thomasqueirozb thomasqueirozb added sink: opentelemetry Anything `opentelemetry` sink related domain: opentelemetry labels Mar 20, 2026
@thomasqueirozb
thomasqueirozb force-pushed the feat/opentelemetry-sink-grpc branch from 8891353 to 6526e41 Compare March 20, 2026 22:38
@github-actions github-actions Bot added the domain: external docs Anything related to Vector's external, public documentation label Mar 20, 2026
@datadog-vectordotdev

This comment has been minimized.

@thomasqueirozb
thomasqueirozb marked this pull request as ready for review March 24, 2026 19:47
@thomasqueirozb
thomasqueirozb requested review from a team as code owners March 24, 2026 19:47
@OliviaShoup

Copy link
Copy Markdown

thanks for the PR! i've created an editorial review card, and someone on the docs team will take a look soon: https://datadoghq.atlassian.net/browse/DOCS-13836

…strict input type, reject template URIs for gRPC
@sakateka

sakateka commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Hi!

Thank you for the great work on supporting the gRPC transport for the OpenTelemetry sink.

I decided to try using the gRPC sink in my setup. After making a few adjustments, everything worked out — now I’m using this new transport to send logs in my env. That’s why I want to help with the current PR and am attaching my modifications as a PR to this branch.

#25757

@pront

pront commented Jul 7, 2026

Copy link
Copy Markdown
Member

Hi!

Thank you for the great work on supporting the gRPC transport for the OpenTelemetry sink.

I decided to try using the gRPC sink in my setup. After making a few adjustments, everything worked out — now I’m using this new transport to send logs in my env. That’s why I want to help with the current PR and am attaching my modifications as a PR to this branch.

#25757

@sakateka thanks! @thomasqueirozb can you review and pull fixes into this PR? Let's drive this to completion.

@OliviaShoup OliviaShoup left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! Nice cleanup. The flattened protocol config reads much more clearly, and it's applied consistently across both highlight examples and the opentelemetry.cue reference 💃

A couple of small docs notes:

  1. Version caveat on Example 2 — Example 1 has the helpful note that the config requires Vector >= 0.51, but Example 2 uses the same new flattened syntax without it. Could we add the same caveat there so folks on older versions aren't tripped up?
  2. Minor typo (pre-existing, in case you want to grab it while you're here) — in the Summary, "This now possible by using the use_otlp_decoding option." is missing a verb: "This is now possible...". Totally optional, since it's outside the scope of your change

Otherwise this looks good from a docs perspective. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: external docs Anything related to Vector's external, public documentation domain: opentelemetry domain: sinks Anything related to the Vector's sinks editorial review sink: opentelemetry Anything `opentelemetry` sink related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support gRPC in the OTEL sink

5 participants