mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-02-05 13:15:41 +02:00
Handle Resource env error when non-nil (#1851)
* Handle Resource env error when non-nil * Add changes to changelog * Update PR number
This commit is contained in:
parent
24a91628f1
commit
62cd933da5
@ -21,6 +21,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||
|
||||
### Fixed
|
||||
|
||||
- Only report errors from the `"go.opentelemetry.io/otel/sdk/resource".Environment` function when they are not `nil`. (#1850, #1851)
|
||||
|
||||
### Security
|
||||
|
||||
## [0.20.0] - 2021-04-23
|
||||
|
@ -149,7 +149,7 @@ func Default() *Resource {
|
||||
func Environment() *Resource {
|
||||
detector := &FromEnv{}
|
||||
resource, err := detector.Detect(context.Background())
|
||||
if err == nil {
|
||||
if err != nil {
|
||||
otel.Handle(err)
|
||||
}
|
||||
return resource
|
||||
|
Loading…
x
Reference in New Issue
Block a user