Skip to content

Add docs for resource out otel#2405

Open
cb645j wants to merge 1 commit intofluent:masterfrom
cb645j:feature/opentelemetry_out_docs_resource
Open

Add docs for resource out otel#2405
cb645j wants to merge 1 commit intofluent:masterfrom
cb645j:feature/opentelemetry_out_docs_resource

Conversation

@cb645j
Copy link
Copy Markdown
Contributor

@cb645j cb645j commented Mar 2, 2026

Summary by CodeRabbit

  • New Features

    • Added a new configuration option to the OpenTelemetry output plugin, allowing users to specify a Resource attribute key for message handling. The option is configurable in both YAML and Fluent Bit formats with a default value of none.
  • Documentation

    • Updated OpenTelemetry output plugin documentation with examples of the new configuration option.

Signed-off-by: BOSLET, CORY <cb645j+ATT@att.com>
@cb645j cb645j requested review from a team and eschabell as code owners March 2, 2026 23:55
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 2, 2026

📝 Walkthrough

Walkthrough

A new configuration option logs_resource_attributes_message_key is added to the OpenTelemetry output plugin documentation. This option allows users to specify a Resource attribute key for messages with a default value of none. The documentation is updated to reflect this addition in parameter tables and example configurations.

Changes

Cohort / File(s) Summary
OpenTelemetry Output Configuration
pipeline/outputs/opentelemetry.md
Added new configuration option logs_resource_attributes_message_key (string, default: none) to the parameter table and updated example pipeline configurations for both Fluent Bit YAML and config formats.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A new key hops into the fold,
logs_resource_attributes_message_key bold,
With none as default, crisp and clean,
The finest telemetry ever seen! 📡✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Add docs for resource out otel' is vague and uses non-descriptive abbreviations that don't clearly convey what documentation was added or what specific resource feature is being documented. Consider a more descriptive title such as 'Add documentation for logs_resource_attributes_message_key configuration option in OpenTelemetry output' to clearly indicate which feature and configuration option is being documented.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pipeline/outputs/opentelemetry.md`:
- Line 41: Update the param table row for logs_resource_attributes_message_key
so its description clearly states that this key names a message-field whose
value will be promoted into the OpenTelemetry Resource attributes (distinct from
logs_resource_metadata_key which maps metadata fields); replace the vague text
with an explicit phrase like “Specify the message field key whose value will be
promoted into the Resource attributes.”
- Line 139: The fluent-bit.conf example includes a new option that is missing
from the fluent-bit.yaml example; update the YAML example in
pipeline/outputs/opentelemetry.md (the fluent-bit.yaml code block around the
current examples) to include the equivalent key/value entry so both examples
demonstrate the same feature set—locate the fluent-bit.conf block to see the
exact option name and value, then add the matching YAML mapping/key under the
fluent-bit.yaml section with the same semantic setting and a brief inline
comment mirroring the conf example.
- Around line 189-190: Remove the invalid Fluent Bit OpenTelemetry output option
`logs_resource_attributes_message_key` and instead demonstrate configuring
resource attributes via a processors pipeline using the `opentelemetry_envelope`
processor with `content_modifier`; specifically, delete the two lines containing
`logs_resource_attributes_message_key application_id` and
`logs_resource_attributes_message_key service_name` and replace (or document)
using an `opentelemetry_envelope` processor block with `content_modifier` rules
to add/rename resource attributes for logs as per the OpenTelemetry processor
usage.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dc38f3c and d51e2fd.

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

| `logs_metadata_key` | Set the key to look up in the metadata. | `otlp` |
| `logs_resource_metadata_key` | Specify a `Resource` key. | `Resource` |
| `logs_resource_metadata_key` | Specify a `Resource` key. | `Resource`
| `logs_resource_attributes_message_key` | Specify a `Resource` key. | _none_ |
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot Mar 2, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Clarify the new key’s purpose in the parameter table.

At Line 41, the description currently matches logs_resource_metadata_key semantics and is too vague. Please make it explicit that this is a message-field key promoted into Resource attributes.

Suggested doc wording
-| `logs_resource_attributes_message_key`    | Specify a `Resource` key.                                                      | _none_                                                                      |
+| `logs_resource_attributes_message_key`    | Specify a message key whose value is added as a `Resource` attribute.          | _none_                                                                      |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| `logs_resource_attributes_message_key` | Specify a `Resource` key. | _none_ |
| `logs_resource_attributes_message_key` | Specify a message key whose value is added as a `Resource` attribute. | _none_ |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pipeline/outputs/opentelemetry.md` at line 41, Update the param table row for
logs_resource_attributes_message_key so its description clearly states that this
key names a message-field whose value will be promoted into the OpenTelemetry
Resource attributes (distinct from logs_resource_metadata_key which maps
metadata fields); replace the vague text with an explicit phrase like “Specify
the message field key whose value will be promoted into the Resource
attributes.”

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.

@cb645j add a bit more clarity for each one in the description please.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

logs_trace_id_message_key: trace_id
logs_severity_text_message_key: loglevel
logs_severity_number_message_key: lognum

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot Mar 2, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Keep YAML and classic config examples aligned.

The new option is shown in the fluent-bit.conf example but not in fluent-bit.yaml near Line 139. Please add the YAML equivalent so both examples demonstrate the same feature set.

Suggested YAML addition
       logs_severity_text_message_key: loglevel
       logs_severity_number_message_key: lognum
+      logs_resource_attributes_message_key: application_id
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pipeline/outputs/opentelemetry.md` at line 139, The fluent-bit.conf example
includes a new option that is missing from the fluent-bit.yaml example; update
the YAML example in pipeline/outputs/opentelemetry.md (the fluent-bit.yaml code
block around the current examples) to include the equivalent key/value entry so
both examples demonstrate the same feature set—locate the fluent-bit.conf block
to see the exact option name and value, then add the matching YAML mapping/key
under the fluent-bit.yaml section with the same semantic setting and a brief
inline comment mirroring the conf example.

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.

@cb645j need to fix this one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

@eschabell eschabell self-assigned this Mar 3, 2026
@eschabell eschabell added waiting-on-code-merge waiting-on-review Waiting on a review from mainteners labels Mar 3, 2026
@eschabell
Copy link
Copy Markdown
Collaborator

@cb645j a few ai review issues to be solved please, see above comment.

@eschabell eschabell added the waiting-for-user Waiting for user/contributors feedback or requested changes label Mar 3, 2026
@eschabell
Copy link
Copy Markdown
Collaborator

@cb645j thanks for the updates, but it's now raised conflicts that I need you to resolve before I can review?

@eschabell eschabell added conflict Waiting on conflict to be resolved by contributor and removed waiting-for-user Waiting for user/contributors feedback or requested changes labels Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflict Waiting on conflict to be resolved by contributor waiting-on-code-merge waiting-on-review Waiting on a review from mainteners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants