Skip to content

opentelemetry-sdk: sketch of an OpAMP integration#4646

Open
xrmx wants to merge 16 commits into
open-telemetry:mainfrom
xrmx:opamp-prototype-integration
Open

opentelemetry-sdk: sketch of an OpAMP integration#4646
xrmx wants to merge 16 commits into
open-telemetry:mainfrom
xrmx:opamp-prototype-integration

Conversation

@xrmx
Copy link
Copy Markdown
Contributor

@xrmx xrmx commented Jun 19, 2025

Description

This is a basic integration for setting up OpAMP in the sdk configurator.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 5, 2026

This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment.
If you're still working on this, please add a comment or push new commits.

@github-actions github-actions Bot added the Stale label Mar 5, 2026
@xrmx xrmx removed the Stale label Mar 5, 2026
@github-actions
Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment.
If you're still working on this, please add a comment or push new commits.


# OpAMP is a system created to configure OpenTelemetry SDKs with a remote config.
# This is different than other init helpers because setting up OpAMP requires distro
# provided code as it's not strictly specified. We call OpAMP init before other code
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In my distro I initialize the OpAMP client after the sdk has been setup but can't exclude other scenarios

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we add this a SIG topic to get the execution order?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've renamed the entry point to pre_sdk_init_function so that we can add a post_sdk_init_function if required

@xrmx xrmx marked this pull request as ready for review March 20, 2026 11:41
@xrmx xrmx requested a review from a team as a code owner March 20, 2026 11:41
@xrmx xrmx moved this to Reviewed PRs that need fixes in Python PR digest Mar 20, 2026
Copy link
Copy Markdown
Member

@pmcollins pmcollins left a comment

Choose a reason for hiding this comment

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

Thanks for doing this. Added a comment.

Comment thread opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py Outdated
Comment thread opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py Outdated
Comment thread opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py Outdated

# OpAMP is a system created to configure OpenTelemetry SDKs with a remote config.
# This is different than other init helpers because setting up OpAMP requires distro
# provided code as it's not strictly specified. We call OpAMP init before other code
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we add this a SIG topic to get the execution order?

@xrmx xrmx force-pushed the opamp-prototype-integration branch from 23f3ff7 to 830fd1b Compare April 9, 2026 09:19
@xrmx xrmx requested review from kelseyma and pmcollins April 14, 2026 13:54
Comment thread opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py Outdated
@xrmx xrmx force-pushed the opamp-prototype-integration branch from 1691294 to 4774c5b Compare May 8, 2026 15:52
@xrmx xrmx requested review from MikeGoldsmith and pmcollins May 10, 2026 10:14
@xrmx
Copy link
Copy Markdown
Contributor Author

xrmx commented May 10, 2026

Added both a pre and post init hook. Failures in the tests looks unrelated but need to take a closer look at them since they are reproducible on CI only on this branch.

Comment thread opentelemetry-sdk/tests/test_configurator.py
Comment thread opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py Outdated
@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.

@xrmx xrmx force-pushed the opamp-prototype-integration branch from f85dc04 to 12143fd Compare May 13, 2026 15:42
Comment thread .changelog/4646.changed Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Reviewed PRs that need fixes

Development

Successfully merging this pull request may close these issues.

5 participants