Skip to content

Move otelconsumer out of x-pack#49929

Open
faec wants to merge 3 commits intoelastic:mainfrom
faec:otelconsumer-relocate
Open

Move otelconsumer out of x-pack#49929
faec wants to merge 3 commits intoelastic:mainfrom
faec:otelconsumer-relocate

Conversation

@faec
Copy link
Copy Markdown
Contributor

@faec faec commented Apr 3, 2026

Move otelconsumer out of x-pack so it can be directly referenced elsewhere in libbeat. This is preparation for the outputController changes in #49679, which involve separating otelconsumer from the general-purpose output API and using it directly from the OTel-specific output controller.

This is just moving the package from one directory to another for symbol visibility, it involves no changes to behavior.

@faec faec self-assigned this Apr 3, 2026
@faec faec added cleanup Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team labels Apr 3, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 3, 2026
@faec faec requested a review from a team as a code owner April 3, 2026 21:42
@faec faec requested review from belimawr and orestisfl April 3, 2026 21:42
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 3, 2026

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @faec? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 12f13e78-24db-495b-8171-bef40d5a911f

📥 Commits

Reviewing files that changed from the base of the PR and between f106000 and b623217.

📒 Files selected for processing (4)
  • libbeat/publisher/pipeline/otelconsumer/benchmark_test.go
  • libbeat/publisher/pipeline/otelconsumer/config.go
  • libbeat/publisher/pipeline/otelconsumer/otelconsumer.go
  • libbeat/publisher/pipeline/otelconsumer/otelconsumer_test.go
✅ Files skipped from review due to trivial changes (4)
  • libbeat/publisher/pipeline/otelconsumer/otelconsumer.go
  • libbeat/publisher/pipeline/otelconsumer/otelconsumer_test.go
  • libbeat/publisher/pipeline/otelconsumer/benchmark_test.go
  • libbeat/publisher/pipeline/otelconsumer/config.go

📝 Walkthrough

Walkthrough

A blank import for libbeat/publisher/pipeline/otelconsumer was added to the core libbeat includes, and the corresponding blank import for x-pack/libbeat/outputs/otelconsumer was removed from the x-pack include file, moving otelconsumer package registration. New otelconsumer package files were added (configuration struct and defaultConfig) and several files had their license headers updated to Apache 2.0. No public APIs were changed.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

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

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

TL;DR

Libbeat: Run check/update failed in Buildkite because the moved otelconsumer files are now under libbeat/ but still carry the Elastic License header style, so go-licenser -license ASL2 rejects them. Update those file headers to the standard Apache-2.0 header used in libbeat, then rerun the check target.

Remediation

  • Replace the license headers in:
    • libbeat/publisher/pipeline/otelconsumer/config.go
    • libbeat/publisher/pipeline/otelconsumer/otelconsumer.go
    • libbeat/publisher/pipeline/otelconsumer/otelconsumer_test.go
    • libbeat/publisher/pipeline/otelconsumer/benchmark_test.go
      with the ASL2 header format used by other libbeat files (for example libbeat/publisher/includes/includes.go:1-16).
  • Re-run make -C libbeat check update && make check-no-changes to confirm headers and generated content are clean.
Investigation details

Root Cause

The PR relocates otelconsumer from x-pack/libbeat/outputs/otelconsumer/ into libbeat/publisher/pipeline/otelconsumer/. Under libbeat, CI enforces Apache-2.0 headers via checkLicenseHeaders (libbeat/scripts/Makefile:144-147, calling go-licenser -license ASL2). The moved files retained the previous Elastic License header style, so header validation fails immediately.

Evidence

  • Build: https://buildkite.com/elastic/beats/builds/43684
  • Job/step: Libbeat: Run check/update (beats-libbeat build https://buildkite.com/elastic/beats-libbeat/builds/27903)
  • Key log excerpt:
    >> fmt - go-licenser: Checking for missing headers
    publisher/pipeline/otelconsumer/benchmark_test.go: is missing the license header
    publisher/pipeline/otelconsumer/config.go: is missing the license header
    publisher/pipeline/otelconsumer/otelconsumer.go: is missing the license header
    publisher/pipeline/otelconsumer/otelconsumer_test.go: is missing the license header
    Error: running "go-licenser -d -license ASL2" failed with exit code 1
    

Verification

Not run locally in this environment; diagnosis is based on the provided Buildkite failure log and repository make target behavior.

Follow-up

After fixing headers, if a subsequent job fails, share that next failing log and I can triage the next blocker.

Note

🔒 Integrity filtering filtered 1 item

Integrity filtering activated and filtered the following item during workflow execution.
This happens when a tool call accesses a resource that does not meet the required integrity or secrecy level of the workflow.


What is this? | From workflow: PR Buildkite Detective

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Copy link
Copy Markdown
Contributor

@leehinman leehinman left a comment

Choose a reason for hiding this comment

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

What about licensing? otelconsumer is Elastic licensed.

@faec
Copy link
Copy Markdown
Contributor Author

faec commented Apr 6, 2026

What about licensing? otelconsumer is Elastic licensed.

@leehinman I checked with @cmacknz beforehand, he says otelconsumer can move as long as the receivers themselves stay in x-pack.

(edit: but I do still need to add the new license headers to the moved files 😄)

@leehinman
Copy link
Copy Markdown
Contributor

@leehinman I checked with @cmacknz beforehand, he says otelconsumer can move as long as the receivers themselves stay in x-pack.

But I think that means you have to re-license otelconsomer to Apache license. I might be missing something but it looks like this PR just renames the files. The errors from make check support this.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants