Skip to content

opamp-client: support text effective config bodies#4536

Merged
xrmx merged 5 commits into
open-telemetry:mainfrom
pmcollins:opamp-text-effective-config
May 15, 2026
Merged

opamp-client: support text effective config bodies#4536
xrmx merged 5 commits into
open-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 Outdated
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?

@pmcollins pmcollins force-pushed the opamp-text-effective-config branch from 9ea2ef1 to 439cf24 Compare May 12, 2026 18:13
@pmcollins
Copy link
Copy Markdown
Member Author

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

Sure, done.

@emdneto
Copy link
Copy Markdown
Member

emdneto commented May 12, 2026

Thanks for the PR!

Just a heads-up: we no longer update CHANGELOG.md directly. The changelog is now generated from changelog fragments using Towncrier.

Please add the appropriate changelog fragment for this change instead of editing CHANGELOG.md manually. You can find the instructions and expected format in CONTRIBUTING.md.

Comment thread opamp/opentelemetry-opamp-client/CHANGELOG.md Outdated
@pmcollins pmcollins force-pushed the opamp-text-effective-config branch from 439cf24 to 68e8cd2 Compare May 13, 2026 15:02
@xrmx xrmx enabled auto-merge (squash) May 15, 2026 16:17
@xrmx xrmx merged commit b1b872b into open-telemetry:main May 15, 2026
753 checks passed
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.

5 participants