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: return a noop SDK if disabled is set to true #6185

Merged
merged 6 commits into from
Oct 4, 2024

Conversation

codeboten
Copy link
Contributor

This change ensures the config package returns a noop SDK if disabled has been set to true by the config.

Additionally, returning the noop SDK on errors to reduce the chances for end users to use an uninitialized sdk struct.

This change ensures the config package returns a noop SDK if disabled has been set
to true by the config.

Additionally, returning the noop SDK on errors to reduce the chances for end
users to use an uninitialized sdk struct.

Signed-off-by: Alex Boten <[email protected]>
@codeboten codeboten requested review from pellared and a team as code owners October 3, 2024 17:33
Signed-off-by: Alex Boten <[email protected]>
Copy link

codecov bot commented Oct 3, 2024

Codecov Report

Attention: Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.

Project coverage is 67.4%. Comparing base (5d9f9cd) to head (c255f44).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
config/config.go 42.8% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #6185   +/-   ##
=====================================
  Coverage   67.4%   67.4%           
=====================================
  Files        206     206           
  Lines      13217   13220    +3     
=====================================
+ Hits        8919    8922    +3     
  Misses      3996    3996           
  Partials     302     302           
Files with missing lines Coverage Δ
config/config.go 85.1% <42.8%> (+0.8%) ⬆️

CHANGELOG.md Outdated Show resolved Hide resolved
@pellared pellared merged commit 1428c2e into open-telemetry:main Oct 4, 2024
23 of 25 checks passed
@MrAlias MrAlias added this to the v1.31.0 milestone Oct 10, 2024
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]>
@codeboten codeboten deleted the codeboten/return-noopsdk branch October 29, 2024 17:59
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.

5 participants