open-telemetry / opentelemetry-go-contrib

Collection of extensions for OpenTelemetry-Go.
https://opentelemetry.io/
Apache License 2.0
1.22k stars 566 forks source link

Update generated config types #6347

Closed evan-bradley closed 2 days ago

evan-bradley commented 3 days ago

This updates the generated config types to be created with go-jsonschema v0.17.0, which includes an update to add a struct tag the AdditionalProperties field that allows it to be marshaled.

Making this change fixes the following error that occurs when I marshal a basic otelcol.Config struct, then run it with the Collector:

'metrics.readers[0].pull.exporter' has invalid keys: additionalproperties

Related to https://github.com/open-telemetry/opentelemetry-collector/issues/11711.

cc @codeboten

codecov[bot] commented 3 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 66.9%. Comparing base (3704ded) to head (9c6dc4f). Report is 1 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/6347/graphs/tree.svg?width=650&height=150&src=pr&token=P6F3W9WA7Q&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/6347?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) ```diff @@ Coverage Diff @@ ## main #6347 +/- ## ===================================== Coverage 66.9% 66.9% ===================================== Files 193 193 Lines 15652 15652 ===================================== + Hits 10479 10482 +3 + Misses 4882 4880 -2 + Partials 291 290 -1 ``` [see 1 file with indirect coverage changes](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/6347/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)

🚨 Try these New Features: