Skip to content

docs: out_opentelemetry: Add 'encoding' option for OTLP/HTTP JSON export#2587

Open
meehanman wants to merge 5 commits into
fluent:masterfrom
meehanman:out_otel-json-export
Open

docs: out_opentelemetry: Add 'encoding' option for OTLP/HTTP JSON export#2587
meehanman wants to merge 5 commits into
fluent:masterfrom
meehanman:out_otel-json-export

Conversation

@meehanman
Copy link
Copy Markdown

@meehanman meehanman commented May 26, 2026

Documentation required for PR out_opentelemetry: Add 'encoding' option for OTLP/HTTP JSON export which adds an encoding configuration option to the out_opentelemetry plugin that controls whether OTLP data is exported as protobuf (default, existing behavior) or JSON (Content-Type: application/json) over HTTP.

While I was at it there are also included Clarifications & rewrites

  • Adds a callout clarifying that encoding only applies to OTLP/HTTP (not gRPC), and that profiles always use protobuf regardless.
  • Updated the intro to explicitly name OTLP/HTTP and OTLP/gRPC as the two transport options (replacing the vague "HTTP endpoint only" note).
  • Rewrote grpc option description to remove the misleading auto value and clarify it enables HTTP/2 automatically.
  • Improved descriptions across ~20 logs_* keys — replacing generic "Specify a X key" placeholders with accurate descriptions of whether the key reads from the record body vs. metadata.
  • Clarified logs_body_key behaviour: multiple values allowed, first match wins, defaults to $log then $message.

Summary by CodeRabbit

  • Documentation
    • Clarified OpenTelemetry output supports OTLP/HTTP and OTLP/gRPC, including HTTP/2 requirement for gRPC.
    • Documented support for logs, metrics, traces, and profiles and refreshed "Get started" guidance for all signal types.
    • Added an "Encoding" section (protobuf vs JSON; encoding applies to OTLP/HTTP only; profiles always protobuf).
    • Expanded configuration table with encoding, gRPC/http2 options; updated logs mapping keys, defaults, and examples.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1f35e450-d72a-4cd7-94ae-6b3dcaaf0c66

📥 Commits

Reviewing files that changed from the base of the PR and between 759a4b0 and b72c6ee.

📒 Files selected for processing (1)
  • pipeline/outputs/opentelemetry.md
✅ Files skipped from review due to trivial changes (1)
  • pipeline/outputs/opentelemetry.md

📝 Walkthrough

Walkthrough

This PR updates pipeline/outputs/opentelemetry.md to document OTLP over HTTP and gRPC (notes HTTP/2 requirement), expands configuration options (encoding, grpc, grpc_uri, http2, logs mappings), and refreshes the "Get started" section and full examples for logs, metrics, traces, and profiles.

Changes

OpenTelemetry Output Documentation

Layer / File(s) Summary
Output description and configuration reference
pipeline/outputs/opentelemetry.md
Plugin intro updated to state OTLP/HTTP and OTLP/gRPC support with HTTP/2 requirement for gRPC. Configuration table reworked to add encoding, grpc, grpc_*_uri, http2, and updated logs_* metadata/body mapping option descriptions and defaults; profiles_uri wording adjusted.
Get started guide and examples
pipeline/outputs/opentelemetry.md
“Get started” rewritten to cover logs, metrics, traces, and profiles; added Encoding section explaining protobuf vs JSON and when encoding applies. Quickstart and Full examples updated (use encoding: json, adjusted fluent-bit.conf header and OTLP log mapping key casing, removed inline user-defined labels comment).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • fluent/fluent-bit-docs#2460: Also updates pipeline/outputs/opentelemetry.md with overlapping changes to gRPC and logs-related configuration keys.

Suggested labels

5.0

Suggested reviewers

  • patrick-stephens
  • alexakreizinger

Poem

🐰 I nibbled docs with floppy-ear delight,
OTLP paths set straight by morning light,
HTTP, gRPC, encodings in tune,
Examples tidy beneath the moon,
A rabbit cheers this doc-update flight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: addition of the 'encoding' option documentation for OTLP/HTTP JSON export, which is the primary focus of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: Dean Meehan <d3an.meehan@hotmail.com>
@meehanman meehanman force-pushed the out_otel-json-export branch from 15457c5 to f10cd68 Compare May 26, 2026 00:23
@meehanman meehanman marked this pull request as ready for review May 26, 2026 00:40
@meehanman meehanman requested review from a team and eschabell as code owners May 26, 2026 00:40
@eschabell eschabell self-assigned this May 26, 2026
@eschabell eschabell added waiting-on-review Waiting on a review from mainteners lint-vale-issues labels May 26, 2026
Copy link
Copy Markdown
Collaborator

@eschabell eschabell left a comment

Choose a reason for hiding this comment

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

@meehanman thanks for the docs PR, just a few vale issues to address.

Comment thread pipeline/outputs/opentelemetry.md Outdated
@eschabell eschabell added the waiting-for-user Waiting for user/contributors feedback or requested changes label May 26, 2026
Signed-off-by: Dean Meehan <d3an.meehan@hotmail.com>
@meehanman meehanman force-pushed the out_otel-json-export branch from 3081ca4 to 56e55c0 Compare May 26, 2026 14:38
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pipeline/outputs/opentelemetry.md`:
- Line 40: The description for logs_body_key is a sentence fragment; update the
paragraph for the `logs_body_key` entry so it is a complete sentence (e.g.,
"This option can be specified multiple times."). Edit the table row for
`logs_body_key` to replace "Can be specified multiple times." with a full
sentence while preserving the rest of the text and formatting, ensuring
consistency with other table entries.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2413febc-cf28-4da0-b8a7-c89d90f2ee24

📥 Commits

Reviewing files that changed from the base of the PR and between 3081ca4 and 56e55c0.

📒 Files selected for processing (1)
  • pipeline/outputs/opentelemetry.md

Comment thread pipeline/outputs/opentelemetry.md Outdated
Signed-off-by: Dean Meehan <d3an.meehan@hotmail.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pipeline/outputs/opentelemetry.md`:
- Line 120: The sentence implying generic HTTP webhook compatibility is
misleading; update the line that mentions "encoding json" and "Content-Type:
application/json" to clarify that OTLP JSON is accepted only by OTLP/HTTP
receivers that explicitly support JSON encoding (not arbitrary webhooks).
Replace "such as HTTP webhook endpoints" with wording like "for OTLP/HTTP
receivers that explicitly support JSON encoding" and ensure the explanation
stays technical and neutral, referencing the "encoding json" option and the
resulting "Content-Type: application/json" header.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d0e8013d-dd4c-4716-8527-6807680611fd

📥 Commits

Reviewing files that changed from the base of the PR and between 56e55c0 and 759a4b0.

📒 Files selected for processing (1)
  • pipeline/outputs/opentelemetry.md

Comment thread pipeline/outputs/opentelemetry.md Outdated
meehanman added 2 commits May 26, 2026 16:27
Signed-off-by: Dean Meehan <d3an.meehan@hotmail.com>
Signed-off-by: Dean Meehan <d3an.meehan@hotmail.com>
Copy link
Copy Markdown
Collaborator

@eschabell eschabell left a comment

Choose a reason for hiding this comment

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

@meehanman a simple vale issue.

{% hint style="info" %}
The `encoding` option applies to **OTLP/HTTP** exports only. When `grpc` is `on`, logs, metrics, and traces are sent over OTLP/gRPC using protobuf framing.

Profiles are always sent as protobuf regardless of the `encoding` setting — no OTLP JSON encoder exists for the profiles signal yet.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@meehanman I'd just replace the - with a comma to fix this issue, as that does not change the meaning?

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

Labels

lint-vale-issues waiting-for-user Waiting for user/contributors feedback or requested changes waiting-on-review Waiting on a review from mainteners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants