Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: support v0.3 of the config schema #6126

Merged
merged 11 commits into from
Oct 11, 2024

Conversation

codeboten
Copy link
Contributor

@codeboten codeboten commented Sep 18, 2024

Adding support for v0.3.0 release of otel configuration.

As part of the changes, i moved the unmarshaling code into its of file for each format (config_json.go and config_yaml.go) to ensure the resulting struct is consistent. Validated this through unit tests

Copy link

codecov bot commented Sep 18, 2024

Codecov Report

Attention: Patch coverage is 64.63023% with 110 lines in your changes missing coverage. Please review.

Project coverage is 66.5%. Comparing base (20e45af) to head (d65e298).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
config/config_json.go 56.0% 50 Missing and 48 partials ⚠️
config/config_yaml.go 70.0% 3 Missing and 3 partials ⚠️
config/metric.go 86.6% 3 Missing and 3 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #6126     +/-   ##
=======================================
- Coverage   66.5%   66.5%   -0.1%     
=======================================
  Files        187     188      +1     
  Lines      12344   12456    +112     
=======================================
+ Hits        8216    8284     +68     
- Misses      3856    3879     +23     
- Partials     272     293     +21     
Files with missing lines Coverage Δ
config/config.go 86.4% <100.0%> (+1.2%) ⬆️
config/log.go 94.2% <100.0%> (ø)
config/resource.go 100.0% <100.0%> (ø)
config/trace.go 96.4% <100.0%> (ø)
config/config_yaml.go 70.0% <70.0%> (ø)
config/metric.go 86.4% <86.6%> (-1.4%) ⬇️
config/config_json.go 56.0% <56.0%> (ø)

... and 1 file with indirect coverage changes

@codeboten
Copy link
Contributor Author

More go proxy sadness :(

Error: detector.go:14:2: k8s.io/[email protected]: Get "https://proxy.golang.org/k8s.io/client-go/@v/v0.31.1.zip": stream error: stream ID 5; PROTOCOL_ERROR
Error: detector.go:15:2: k8s.io/[email protected]: Get "https://proxy.golang.org/k8s.io/client-go/@v/v0.31.1.zip": stream error: stream ID 5; PROTOCOL_ERROR

config/metric.go Outdated Show resolved Hide resolved
config/metric.go Show resolved Hide resolved
@codeboten
Copy link
Contributor Author

codeboten commented Oct 2, 2024

The link check failure appears unrelated

@MrAlias
Copy link
Contributor

MrAlias commented Oct 8, 2024

The link check failure appears unrelated

Indeed: #6183

CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Alex Boten <[email protected]>
Signed-off-by: Alex Boten <[email protected]>
Signed-off-by: Alex Boten <[email protected]>
This will give us more flexibility to ensure unmarshaling in both yaml/json
returns a consistent structure.

Signed-off-by: Alex Boten <[email protected]>
@dmathieu dmathieu merged commit 45ba204 into open-telemetry:main Oct 11, 2024
23 of 24 checks passed
@codeboten codeboten deleted the codeboten/v3-config branch October 11, 2024 14:19
MrAlias added a commit that referenced this pull request Oct 14, 2024
### Added

- The `Severitier` and `SeverityVar` types are added to
`go.opentelemetry.io/contrib/processors/minsev` allowing dynamic
configuration of the severity used by the `LogProcessor`. (#6116)
- Move examples from `go.opentelemetry.io/otel` to this repository under
`examples` directory. (#6158)
- Support yaml/json struct tags for generated code in
`go.opentelemetry.io/contrib/config`. (#5433)
- Add support for parsing YAML configuration via `ParseYAML` in
`go.opentelemetry.io/contrib/config`. (#5433)
- Add support for temporality preference configuration in
`go.opentelemetry.io/contrib/config`. (#5860)

### Changed

- The function signature of `NewLogProcessor` in
`go.opentelemetry.io/contrib/processors/minsev` has changed to accept
the added `Severitier` interface instead of a `log.Severity`. (#6116)
- Updated `go.opentelemetry.io/contrib/config` to use the
[v0.3.0](https://github.com/open-telemetry/opentelemetry-configuration/releases/tag/v0.3.0)
release of schema which includes backwards incompatible changes. (#6126)
- `NewSDK` in `go.opentelemetry.io/contrib/config` now returns a no-op
SDK if `disabled` is set to `true`. (#6185)
- The deprecated
`go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho`
package has found a Code Owner. The package is no longer deprecated.
(#6207)

### Fixed

- Possible nil dereference panic in
`go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace`.
(#5965)
- `logrus.Level` transformed to appropriate `log.Severity` in
`go.opentelemetry.io/contrib/bridges/otellogrus`. (#6191)

### Removed

- The `Minimum` field of the `LogProcessor` in
`go.opentelemetry.io/contrib/processors/minsev` is removed.
  Use `NewLogProcessor` to configure this setting. (#6116)
- The deprecated
`go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron`
package is removed. (#6186)
- The deprecated `go.opentelemetry.io/contrib/samplers/aws/xray` package
is removed. (#6187)

---------

Co-authored-by: David Ashpole <[email protected]>
@MrAlias MrAlias added this to the v1.31.0 milestone Oct 14, 2024
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