Skip to content

Add configurable TLS settings and server endpoint to agent example#461

Merged
tigrannajaryan merged 4 commits into
open-telemetry:mainfrom
juandemanjon:issue460
Dec 3, 2025
Merged

Add configurable TLS settings and server endpoint to agent example#461
tigrannajaryan merged 4 commits into
open-telemetry:mainfrom
juandemanjon:issue460

Conversation

@juandemanjon

@juandemanjon juandemanjon commented Nov 13, 2025

Copy link
Copy Markdown
Contributor

This PR is related to issue #460

  • Introduces configurable TLS options for the example agent.
  • Adds support for specifying a server endpoint.
  • Relays on go.opentelemetry.io/collector/config/configtls to get the agent *tls.Config
  • Server example is listening for incoming connections on all available network interfaces

Manual Testing

  • make run-examples
  • cd internal/examples; go run agent/main.go --tls-insecure_skip_verify --endpoint wss://example:4320/v1/opamp

@juandemanjon
juandemanjon requested a review from a team as a code owner November 13, 2025 06:46
@codecov

codecov Bot commented Nov 13, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.23%. Comparing base (ad4ec01) to head (39c407a).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #461      +/-   ##
==========================================
- Coverage   81.42%   81.23%   -0.20%     
==========================================
  Files          27       27              
  Lines        2100     2100              
==========================================
- Hits         1710     1706       -4     
- Misses        265      269       +4     
  Partials      125      125              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@michel-laterman michel-laterman left a comment

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.

The consistency with the collector is a good step; thanks for doing the work!


type AgentConfig struct {
Endpoint string `mapstructure:"endpoint"`
TLSSetting configtls.ClientConfig `mapstructure:"tls,omitempty"`

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.

👍

Comment thread internal/examples/agent/main.go
@tigrannajaryan
tigrannajaryan merged commit f96a761 into open-telemetry:main Dec 3, 2025
10 of 11 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.

3 participants