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: separate schema version support into separate directories #6412

Merged
merged 7 commits into from
Dec 10, 2024

Conversation

codeboten
Copy link
Contributor

This makes the migration from one version to another explicit in any downstream dependencies. This will make dealing with breaking changes much easier in the Collector as it will allow us to have end users toggle a feature gate to enable support for new schema versions.

Doing this today is not possible as we cannot import both a v0.2.0 and a v0.3.0 compatible config package. With the change in this PR, this will be possible.

v0.2.0 directory was a copy based on 355fbbd

This makes the migration from one version to another explicit in any downstream
dependencies. This will make dealing with breaking changes much easier in the
Collector as it will allow us to have end users toggle a feature gate to enable
support for new schema versions.

Doing this today is not possible as we cannot import both a v0.2.0 and a v0.3.0
compatible config package. With the change in this PR, this will be possible.

v0.2.0 directory was a copy based on 355fbbd

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
@codeboten codeboten requested review from pellared and a team as code owners December 9, 2024 17:52
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 81.30531% with 169 lines in your changes missing coverage. Please review.

Project coverage is 67.7%. Comparing base (cee0910) to head (3f9db7f).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
config/v0.2.0/generated_config.go 43.5% 70 Missing and 35 partials ⚠️
config/v0.2.0/metric.go 88.5% 34 Missing and 8 partials ⚠️
config/v0.2.0/config.go 80.3% 8 Missing and 4 partials ⚠️
config/v0.2.0/log.go 94.3% 3 Missing and 3 partials ⚠️
config/v0.2.0/trace.go 97.1% 2 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #6412     +/-   ##
=======================================
+ Coverage   67.0%   67.7%   +0.7%     
=======================================
  Files        193     199      +6     
  Lines      15660   16564    +904     
=======================================
+ Hits       10497   11229    +732     
- Misses      4874    4993    +119     
- Partials     289     342     +53     
Files with missing lines Coverage Δ
config/v0.2.0/resource.go 100.0% <100.0%> (ø)
config/v0.3.0/config.go 86.1% <ø> (ø)
config/v0.3.0/config_json.go 47.1% <ø> (ø)
config/v0.3.0/config_yaml.go 62.5% <ø> (ø)
config/v0.3.0/log.go 94.9% <ø> (ø)
config/v0.3.0/metric.go 85.3% <ø> (ø)
config/v0.3.0/resource.go 100.0% <ø> (ø)
config/v0.3.0/trace.go 97.1% <ø> (ø)
config/v0.2.0/trace.go 97.1% <97.1%> (ø)
config/v0.2.0/log.go 94.3% <94.3%> (ø)
... and 3 more

... and 1 file with indirect coverage changes

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good approach to me. It matches our semconv packaging.

The test failures need to be addressed, but other than that looks good at a high level.

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
@codeboten
Copy link
Contributor Author

test fixed 👍🏻

CHANGELOG.md Outdated Show resolved Hide resolved
codeboten and others added 2 commits December 10, 2024 06:56
@MrAlias MrAlias merged commit 3af31bd into open-telemetry:main Dec 10, 2024
26 checks passed
@MrAlias MrAlias added this to the v1.33.0 milestone Dec 11, 2024
MrAlias added a commit that referenced this pull request Dec 12, 2024
### Added

- Added support for providing `endpoint`, `pollingIntervalMs` and
`initialSamplingRate` using environment variable
`OTEL_TRACES_SAMPLER_ARG` in
`go.opentelemetry.io/contrib/samples/jaegerremote`. (#6310)
- Added support exporting logs via OTLP over gRPC in
`go.opentelemetry.io/contrib/config`. (#6340)
- The `go.opentelemetry.io/contrib/bridges/otellogr` module.
This module provides an OpenTelemetry logging bridge for
`github.com/go-logr/logr`. (#6386)
- Added SNS instrumentation in
`go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws`.
(#6388)

### Changed

- Change the span name to be `GET /path` so it complies with the OTel
HTTP semantic conventions in
`go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho`.
(#6365)
- Record errors instead of setting the `gin.errors` attribute in
`go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin`.
(#6346)
- The `go.opentelemetry.io/contrib/config` now supports multiple schemas
in subdirectories (i.e. `go.opentelemetry.io/contrib/config/v0.3.0`) for
easier migration. (#6412)

### Fixed

- Fix broken AWS presigned URLs when using instrumentation in
`go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws`.
(#5975)
- Fixed the value for configuring the OTLP exporter to use `grpc`
instead of `grpc/protobuf` in `go.opentelemetry.io/contrib/config`.
(#6338)
- Allow marshaling types in `go.opentelemetry.io/contrib/config`.
(#6347)
- Removed the redundant handling of panic from the `HTML` function in
`go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin`.
(#6373)
- The `code.function` attribute emitted by
`go.opentelemetry.io/contrib/bridges/otelslog` now stores just the
function name instead the package path-qualified function name. The
`code.namespace` attribute now stores the package path. (#6415)
- The `code.function` attribute emitted by
`go.opentelemetry.io/contrib/bridges/otelzap` now stores just the
function name instead the package path-qualified function name. The
`code.namespace` attribute now stores the package path. (#6423)
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