Skip to content

Add experimental OpAMP client#4486

Open
RassK wants to merge 53 commits intoopen-telemetry:mainfrom
RassK:opamp-client
Open

Add experimental OpAMP client#4486
RassK wants to merge 53 commits intoopen-telemetry:mainfrom
RassK:opamp-client

Conversation

@RassK
Copy link
Copy Markdown
Contributor

@RassK RassK commented Sep 29, 2025

What

Adds experimental opamp client.
Registers client to the server (http/s or ws/s).
More info in contrib repo:
https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.OpAmp.Client

Tests

Build was locally tested.
Additional tools are unit tested.

http connection is integration tested. (websocket is tested in contrib side, let me know if anyone feels it's important to have ws tests in this repo as well).

Checklist

  • CHANGELOG.md is updated.
  • Documentation is updated.
  • New features are covered by tests.

# Conflicts:
#	src/OpenTelemetry.AutoInstrumentation/Configurations/GeneralSettings.cs
@RassK RassK requested a review from a team as a code owner September 29, 2025 20:09
Copy link
Copy Markdown
Member

@Kielek Kielek left a comment

Choose a reason for hiding this comment

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

I have 2 concerns here

  1. New transitive dependencies.
    • Google.Protobuf was already removed from the distribution in scope of update od OTel ADK to 1.11.0: 3986
    • System.Collections.Immutable - Do you any possibility to drop this dependency in Opam.Client package?
  2. Lack of integration tests with OpAmp server. I see 2 options here
    • create mocked server as we have for OTLP protocol
    • Utilize some existing dockerized server.
      Adding this kind of tests can be done as follow up PR.

@RassK RassK closed this Sep 30, 2025
@RassK
Copy link
Copy Markdown
Contributor Author

RassK commented Sep 30, 2025

I have 2 concerns here

  1. New transitive dependencies.

    • Google.Protobuf was already removed from the distribution in scope of update od OTel ADK to 1.11.0: 3986

I was looking what OpenTelemetry.Exporter.OpenTelemetryProtocol was doing. This experience could be transferred to OpAMP client as well.

  • System.Collections.Immutable - Do you any possibility to drop this dependency in Opam.Client package?

Probably not. This may have to stay.
Update: @Kielek found a way to fix it, so we can go fully without deps

  1. Lack of integration tests with OpAmp server. I see 2 options here

    • create mocked server as we have for OTLP protocol
    • Utilize some existing dockerized server.
      Adding this kind of tests can be done as follow up PR.

I could reuse OpAMP Go's example server.

@RassK RassK reopened this Sep 30, 2025
Copy link
Copy Markdown
Contributor

@ysolomchenko ysolomchenko left a comment

Choose a reason for hiding this comment

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

I believe it makes sense to create separate settings for OpAMP and handle calculations there (ConnectionType and ServerUrl). This would allow us :

  • Keep code consistency
  • Add file-based configuration

@RassK
Copy link
Copy Markdown
Contributor Author

RassK commented Sep 30, 2025

I believe it makes sense to create separate settings for OpAMP and handle calculations there (ConnectionType and ServerUrl). This would allow us :

  • Keep code consistency
  • Add file-based configuration

Yes, this seems good change for this PR even.

@RassK
Copy link
Copy Markdown
Contributor Author

RassK commented Oct 1, 2025

Moving to draft. The plan is to implement the next version without deps.

@RassK RassK marked this pull request as draft October 1, 2025 15:39
# Conflicts:
#	docs/file-based-configuration.md
#	src/Directory.Packages.props
#	src/OpenTelemetry.AutoInstrumentation.Assemblies.NetFramework/Directory.Packages.props
#	src/OpenTelemetry.AutoInstrumentation.Native/netfx_assembly_redirection.h
#	src/OpenTelemetry.AutoInstrumentation/Configurations/FileBasedConfiguration/YamlConfiguration.cs
#	src/OpenTelemetry.AutoInstrumentation/Instrumentation.cs
#	test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-arm64.verified.txt
#	test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-x64.verified.txt
#	test/IntegrationTests/BuildTests.DistributionStructure_linux-arm64.verified.txt
#	test/IntegrationTests/BuildTests.DistributionStructure_linux-x64.verified.txt
#	test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt
#	test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt
@lachmatt
Copy link
Copy Markdown
Contributor

Blocked at the moment by: #4783

# Conflicts:
#	src/Directory.Packages.props
#	src/OpenTelemetry.AutoInstrumentation.Assemblies.NetFramework/Directory.Packages.props
#	src/OpenTelemetry.AutoInstrumentation.Native/netfx_assembly_redirection.h
#	src/OpenTelemetry.AutoInstrumentation/Instrumentation.cs
#	test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-arm64.verified.txt
#	test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-x64.verified.txt
#	test/IntegrationTests/BuildTests.DistributionStructure_linux-arm64.verified.txt
#	test/IntegrationTests/BuildTests.DistributionStructure_linux-x64.verified.txt
#	test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt
#	test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt
RassK and others added 6 commits April 9, 2026 12:00
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
# Conflicts:
#	src/Directory.Packages.props
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 28 out of 28 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/OpenTelemetry.AutoInstrumentation/Configurations/OpAmpSettings.cs Outdated
Comment thread src/OpenTelemetry.AutoInstrumentation/Util/ResourceHelper.cs
@ysolomchenko
Copy link
Copy Markdown
Contributor

I believe it’s worth adding parser tests for the file-based opamp

Kielek
Kielek previously requested changes Apr 10, 2026
Copy link
Copy Markdown
Member

@Kielek Kielek left a comment

Choose a reason for hiding this comment

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

Comment on lines +624 to +632
``` yaml
opamp/development:
# Configure if OpAMP client is enabled.
# If omitted or null, the client is disabled.
enabled: false
# Configure the server endpoint. If not explicitly set, a default
# URL is used: https://localhost:4318/v1/opamp.
server_url: https://localhost:4318/v1/opamp
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove enabled from opamp file based. Typically, if the node is available, it means that it is enabled. To disable, you should remove whole node.

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.

discussions moved forward, there is even better version > open-telemetry/opentelemetry-configuration#544 (comment)

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.

@ysolomchenko removed enabled for now. Spec seems to be moving slowly, so we may change it later then.

RassK added 4 commits April 28, 2026 12:36
# Conflicts:
#	src/Directory.Packages.props
#	src/OpenTelemetry.AutoInstrumentation.Assemblies/Directory.Packages.props
#	src/OpenTelemetry.AutoInstrumentation.Native/assembly_redirection_net.h
#	src/OpenTelemetry.AutoInstrumentation.Native/assembly_redirection_netfx.h
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 35 out of 35 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/OpenTelemetry.AutoInstrumentation/OpAmpHelper.cs
Comment thread test/IntegrationTests/Helpers/MockOpAmpServer.cs Outdated
Comment thread test/IntegrationTests/OpAmpTests.cs Outdated
Comment thread src/OpenTelemetry.AutoInstrumentation/Constants.cs
Comment thread src/OpenTelemetry.AutoInstrumentation/Util/ResourceHelper.cs
@Kielek Kielek dismissed their stale review April 30, 2026 10:31

0.3.0-alpha.1 package should be safe to use

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