Skip to content

[AutoOps] Serialize custom struct before sending as event#45015

Merged
pickypg merged 2 commits intomainfrom
autoops/serialize-for-otel
Jun 25, 2025
Merged

[AutoOps] Serialize custom struct before sending as event#45015
pickypg merged 2 commits intomainfrom
autoops/serialize-for-otel

Conversation

@pickypg
Copy link
Copy Markdown
Member

@pickypg pickypg commented Jun 24, 2025

This pre-serialization step is unnecessary for AutoOps running as part of Metricbeat, but it is necessary to allow it to work with OTel because the OTel Consumer cannot handle the serialization of structs.

Proposed commit message

Pre-serialize AutoOps cat_shards metricset for OTel mode.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

Wasted performance in Metricbeat mode, but required to work in OTel mode.

Author's Checklist

How to test this PR locally

Merge this branch with #45008, then compile it with Elastic Agent and run it in OTel mode with this metricset.

Related issues

This pre-serialization step is unnecessary for AutoOps running as
part of Metricbeat, but it is necessary to allow it to work with
OTel because the OTel Consumer cannot handle the serialization of
structs.
@pickypg pickypg self-assigned this Jun 24, 2025
@pickypg pickypg requested a review from a team as a code owner June 24, 2025 22:22
@pickypg pickypg added release-note:skip The PR should be ignored when processing the changelog backport-skip Skip notification from the automated backport with mergify Team:Opex labels Jun 24, 2025
@botelastic botelastic Bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jun 24, 2025
@github-actions
Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

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

@pickypg pickypg enabled auto-merge (squash) June 25, 2025 01:08
Copy link
Copy Markdown
Contributor

@romulo-batista-elastic romulo-batista-elastic left a comment

Choose a reason for hiding this comment

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

LGTM

@pickypg pickypg merged commit 38f6842 into main Jun 25, 2025
33 checks passed
@pickypg pickypg deleted the autoops/serialize-for-otel branch June 25, 2025 09:16
pickypg added a commit that referenced this pull request Jun 28, 2025
pickypg added a commit that referenced this pull request Jun 30, 2025
mergify Bot pushed a commit that referenced this pull request Jun 30, 2025
pickypg added a commit that referenced this pull request Jun 30, 2025
…5015)" (#45104) (#45120)

This reverts commit 38f6842.

(cherry picked from commit 84c0c70)

Co-authored-by: Chris Earle <pickypg@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-skip Skip notification from the automated backport with mergify release-note:skip The PR should be ignored when processing the changelog Team:Opex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants