Move smart agent config validation from unmarshal#6187
Merged
Conversation
473c9f6 to
e596c6c
Compare
Codecov ReportAttention: Patch coverage is
❌ Your project check has failed because the head coverage (34.16%) is below the target coverage (40.00%). You can increase the head coverage or adjust the target coverage.
Additional details and impacted files@@ Coverage Diff @@
## main #6187 +/- ##
===========================================
- Coverage 44.52% 34.16% -10.37%
===========================================
Files 390 390
Lines 27014 26993 -21
===========================================
- Hits 12028 9221 -2807
- Misses 14148 17152 +3004
+ Partials 838 620 -218 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
crobert-1
approved these changes
May 2, 2025
This fixes receiver_creator failing to start smartagent receivers since 0.124.0 with the following error:
```
2025-05-01T09:35:43.989Z info receivercreator@v0.124.1-0.20250415150511-f840bdff19ca/observerhandler.go:201 starting receiver {"name": "smartagent/coredns", "endpoint": "10.42.0.8", "endpoint_id": "k8s_observer/c7a1646a-969d-4e5d-9bbd-a95574b903b3", "config": {"extraDimensions":{"metric_source":"k8s-coredns"},"port":9153,"type":"coredns"}}
2025-05-01T09:35:43.991Z error receivercreator@v0.124.1-0.20250415150511-f840bdff19ca/observerhandler.go:217 failed to start receiver {"receiver": "smartagent/coredns", "error": "failed creating endpoint-derived receiver: Validation error in field 'Config.host': host is a required field (got '')"}
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator.(*observerHandler).startReceiver
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator@v0.124.1-0.20250415150511-f840bdff19ca/observerhandler.go:217
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator.(*observerHandler).OnAdd
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator@v0.124.1-0.20250415150511-f840bdff19ca/observerhandler.go:105
github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/endpointswatcher.(*EndpointsWatcher).updateAndNotifyOfEndpoints
github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer@v0.124.1/endpointswatcher/endpointswatcher.go:114
```
454dff
e596c6c to
5109a48
Compare
dloucasfx
reviewed
May 2, 2025
dloucasfx
approved these changes
May 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes receiver_creator failing to start smartagent receivers since 0.124.0 with the following error: