Skip to content

elasticotel: move to upstream opamp client#512

Merged
xrmx merged 1 commit intomainfrom
use-upstream-opamp-client
Mar 30, 2026
Merged

elasticotel: move to upstream opamp client#512
xrmx merged 1 commit intomainfrom
use-upstream-opamp-client

Conversation

@xrmx
Copy link
Copy Markdown
Member

@xrmx xrmx commented Mar 24, 2026

What does this pull request do?

Delete our version of the client and updates the distro code for the upstream changes regarding naming and client callbacks. This keeps a bunch of e2e tests against our own server implementation.

Related issues

Closes #508

@xrmx xrmx requested review from a team as code owners March 24, 2026 16:04
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 24, 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: 273b7ca8-8160-4def-8510-f59eacd98772

📥 Commits

Reviewing files that changed from the base of the PR and between f7f6803 and 381974a.

📒 Files selected for processing (27)
  • dev-requirements.txt
  • opamp-gen-requirements.txt
  • pyproject.toml
  • scripts/opamp_proto_codegen.sh
  • src/elasticotel/distro/__init__.py
  • src/elasticotel/distro/config.py
  • src/opentelemetry/_opamp/README.md
  • src/opentelemetry/_opamp/__init__.py
  • src/opentelemetry/_opamp/agent.py
  • src/opentelemetry/_opamp/client.py
  • src/opentelemetry/_opamp/exceptions.py
  • src/opentelemetry/_opamp/messages.py
  • src/opentelemetry/_opamp/proto/anyvalue_pb2.py
  • src/opentelemetry/_opamp/proto/anyvalue_pb2.pyi
  • src/opentelemetry/_opamp/proto/opamp_pb2.py
  • src/opentelemetry/_opamp/proto/opamp_pb2.pyi
  • src/opentelemetry/_opamp/transport/base.py
  • src/opentelemetry/_opamp/transport/exceptions.py
  • src/opentelemetry/_opamp/transport/requests.py
  • src/opentelemetry/_opamp/version.py
  • tests/distro/test_distro.py
  • tests/opamp/cassettes/test_connection_remote_config_status_heartbeat_disconnection.yaml
  • tests/opamp/cassettes/test_default_callbacks.yaml
  • tests/opamp/test_agent.py
  • tests/opamp/test_client.py
  • tests/opamp/test_e2e.py
  • tests/opamp/transport/test_requests.py
💤 Files with no reviewable changes (19)
  • src/opentelemetry/_opamp/README.md
  • opamp-gen-requirements.txt
  • src/opentelemetry/_opamp/init.py
  • src/opentelemetry/_opamp/version.py
  • src/opentelemetry/_opamp/transport/exceptions.py
  • src/opentelemetry/_opamp/proto/opamp_pb2.py
  • src/opentelemetry/_opamp/proto/anyvalue_pb2.py
  • tests/opamp/test_agent.py
  • scripts/opamp_proto_codegen.sh
  • tests/opamp/transport/test_requests.py
  • src/opentelemetry/_opamp/transport/requests.py
  • src/opentelemetry/_opamp/transport/base.py
  • src/opentelemetry/_opamp/client.py
  • tests/opamp/test_client.py
  • src/opentelemetry/_opamp/proto/anyvalue_pb2.pyi
  • src/opentelemetry/_opamp/proto/opamp_pb2.pyi
  • src/opentelemetry/_opamp/exceptions.py
  • src/opentelemetry/_opamp/agent.py
  • src/opentelemetry/_opamp/messages.py
✅ Files skipped from review due to trivial changes (2)
  • tests/opamp/cassettes/test_default_callbacks.yaml
  • dev-requirements.txt
🚧 Files skipped from review as they are similar to previous changes (5)
  • pyproject.toml
  • src/elasticotel/distro/init.py
  • tests/opamp/cassettes/test_connection_remote_config_status_heartbeat_disconnection.yaml
  • tests/opamp/test_e2e.py
  • src/elasticotel/distro/config.py

📝 Walkthrough

Walkthrough

This PR replaces the in-repo OpAMP implementation with the upstream package opentelemetry-opamp-client==0.1b0 (runtime and dev dependency). It removes the local src/opentelemetry/_opamp/ modules (agent, client, messages, transport, proto generated files, exceptions, version, README) and the opamp codegen script and gen requirements. Distro wiring switches from a message_handler to an EDOTOpAMPCallbacks callbacks class and updates calls to public client methods. Packaging metadata and test cassettes were updated; several unit tests covering the removed modules were deleted and remaining tests adjusted for the callbacks API.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed PR successfully removes internal OpAMP client implementation and adopts upstream opentelemetry-opamp-client==0.1b0 as a dependency.
Out of Scope Changes check ✅ Passed All changes directly support migration to upstream OpAMP client: removing internal client code, adding upstream dependency, and updating distro integration code.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch use-upstream-opamp-client
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

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

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tests/distro/test_distro.py`:
- Around line 555-557: Update every test expectation that calls
client.update_effective_config in this test class to include the new keyword
argument content_type="application/json" because EDOTOpAMPCallbacks.on_message()
now passes that kwarg; locate calls to client.update_effective_config (the
assertion lines shown) and add the content_type kwarg to the
assert_called_once_with(...) expectation so the expected call signature matches
the implementation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0b8102e1-7c7c-4a7c-893a-ad27319aee25

📥 Commits

Reviewing files that changed from the base of the PR and between 5a2f2cd and f7f6803.

📒 Files selected for processing (27)
  • dev-requirements.txt
  • opamp-gen-requirements.txt
  • pyproject.toml
  • scripts/opamp_proto_codegen.sh
  • src/elasticotel/distro/__init__.py
  • src/elasticotel/distro/config.py
  • src/opentelemetry/_opamp/README.md
  • src/opentelemetry/_opamp/__init__.py
  • src/opentelemetry/_opamp/agent.py
  • src/opentelemetry/_opamp/client.py
  • src/opentelemetry/_opamp/exceptions.py
  • src/opentelemetry/_opamp/messages.py
  • src/opentelemetry/_opamp/proto/anyvalue_pb2.py
  • src/opentelemetry/_opamp/proto/anyvalue_pb2.pyi
  • src/opentelemetry/_opamp/proto/opamp_pb2.py
  • src/opentelemetry/_opamp/proto/opamp_pb2.pyi
  • src/opentelemetry/_opamp/transport/base.py
  • src/opentelemetry/_opamp/transport/exceptions.py
  • src/opentelemetry/_opamp/transport/requests.py
  • src/opentelemetry/_opamp/version.py
  • tests/distro/test_distro.py
  • tests/opamp/cassettes/test_connection_remote_config_status_heartbeat_disconnection.yaml
  • tests/opamp/cassettes/test_default_callbacks.yaml
  • tests/opamp/test_agent.py
  • tests/opamp/test_client.py
  • tests/opamp/test_e2e.py
  • tests/opamp/transport/test_requests.py
💤 Files with no reviewable changes (19)
  • src/opentelemetry/_opamp/README.md
  • src/opentelemetry/_opamp/exceptions.py
  • src/opentelemetry/_opamp/init.py
  • opamp-gen-requirements.txt
  • src/opentelemetry/_opamp/transport/exceptions.py
  • src/opentelemetry/_opamp/proto/anyvalue_pb2.py
  • src/opentelemetry/_opamp/transport/requests.py
  • scripts/opamp_proto_codegen.sh
  • src/opentelemetry/_opamp/transport/base.py
  • src/opentelemetry/_opamp/client.py
  • src/opentelemetry/_opamp/proto/opamp_pb2.py
  • src/opentelemetry/_opamp/proto/anyvalue_pb2.pyi
  • tests/opamp/test_client.py
  • tests/opamp/test_agent.py
  • src/opentelemetry/_opamp/agent.py
  • src/opentelemetry/_opamp/proto/opamp_pb2.pyi
  • src/opentelemetry/_opamp/version.py
  • src/opentelemetry/_opamp/messages.py
  • tests/opamp/transport/test_requests.py

Delete our version of the client and updates the distro code for the
upstream changes regarding naming and client callbacks.
This keeps a bunch of e2e tests against our own server implementation.
@xrmx xrmx force-pushed the use-upstream-opamp-client branch from f7f6803 to 381974a Compare March 24, 2026 16:24
@xrmx xrmx merged commit d7e5457 into main Mar 30, 2026
20 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.

Switch to upstream opentelemetry-opamp-client

3 participants