Skip to content

opamp-client: support text effective config bodies#4536

Open
pmcollins wants to merge 2 commits intoopen-telemetry:mainfrom
pmcollins:opamp-text-effective-config
Open

opamp-client: support text effective config bodies#4536
pmcollins wants to merge 2 commits intoopen-telemetry:mainfrom
pmcollins:opamp-text-effective-config

Conversation

@pmcollins
Copy link
Copy Markdown
Member

Description

Adds support for building OpAMP effective config messages from non-JSON text or bytes bodies. This allows callers to report effective configuration with MIME types such as text/plain, while preserving the existing application/json behavior.

This aligns with the OpAMP spec's AgentConfigFile model, where body is raw bytes and content_type describes those bytes.

Addresses #4535

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Added OpAMP unit tests.

  • Added coverage for text/plain effective config bodies
  • Added coverage for bytes effective config bodies
  • Added coverage that full-state OpAMP messages preserve content_type and body

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@pmcollins pmcollins marked this pull request as ready for review May 5, 2026 21:08
@pmcollins pmcollins requested a review from a team as a code owner May 5, 2026 21:08
Comment thread opamp/opentelemetry-opamp-client/src/opentelemetry/_opamp/messages.py Outdated
Comment thread opamp/opentelemetry-opamp-client/CHANGELOG.md
Copy link
Copy Markdown
Contributor

@JWinermaSplunk JWinermaSplunk left a comment

Choose a reason for hiding this comment

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

Did we want to add coverage for a non serializable value with content type application/json?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants