Add experimental OpAMP client#4486
Conversation
# Conflicts: # src/OpenTelemetry.AutoInstrumentation/Configurations/GeneralSettings.cs
Kielek
left a comment
There was a problem hiding this comment.
I have 2 concerns here
- New transitive dependencies.
Google.Protobufwas already removed from the distribution in scope of update od OTel ADK to 1.11.0: 3986System.Collections.Immutable- Do you any possibility to drop this dependency in Opam.Client package?
- 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 was looking what OpenTelemetry.Exporter.OpenTelemetryProtocol was doing. This experience could be transferred to OpAMP client as well.
Probably not. This may have to stay.
I could reuse OpAMP Go's example server. |
ysolomchenko
left a comment
There was a problem hiding this comment.
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. |
|
Moving to draft. The plan is to implement the next version without deps. |
# 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
|
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
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
# Conflicts: # src/Directory.Packages.props
There was a problem hiding this comment.
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.
|
I believe it’s worth adding parser tests for the file-based opamp |
| ``` 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 | ||
| ``` |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
discussions moved forward, there is even better version > open-telemetry/opentelemetry-configuration#544 (comment)
There was a problem hiding this comment.
@ysolomchenko removed enabled for now. Spec seems to be moving slowly, so we may change it later then.
# 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
There was a problem hiding this comment.
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.
0.3.0-alpha.1 package should be safe to use
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.mdis updated.