1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-02 08:52:21 +02:00
opentelemetry-go/sdk/resource
Luiz Aoqui 05aca23c19
Decode values from OTEL_RESOURCE_ATTRIBUTES (#2963)
* Decode values from OTEL_RESOURCE_ATTRIBUTES

The W3C spec specifies that values must be percent-encoded so when
reading the environment variable `OTEL_RESOURCE_ATTRIBUTES` the SDK
should decode them.

This is done by the `baggage` package, but its behaviour in case of
errors is slightly different from the current implementation of the SDK,
more specifically in cases where a key is missing a value. The SDK
returns a partial resource while the `bagage` package returns nil.

This may be considered a breaking change, so this commit fixes the
current implementation instead of using `baggage.Parse`.

* Add changelog entry for #2963

* Use otel.Handle on OTEL_RESOURCE_ATTRIBUTES decode error

* retain original value when decoding fails

* docs: update CHANGELOG

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-10-19 09:13:20 -07:00
..
auto_test.go Add semconv/v1.12.0 (#3010) 2022-07-13 09:55:43 -04:00
auto.go Add godot linter to golangci (#2845) 2022-04-25 13:22:49 -07:00
benchmark_test.go Use already enabled revive linter and add depguard (#2883) 2022-05-19 15:15:07 -05:00
builtin_test.go Use already enabled revive linter and add depguard (#2883) 2022-05-19 15:15:07 -05:00
builtin.go Add semconv/v1.12.0 (#3010) 2022-07-13 09:55:43 -04:00
config.go Document Resource options that potentially leak secrets (#2727) 2022-03-28 07:35:09 -07:00
container_test.go Add container id support to Resource (#2418) 2022-03-03 12:13:31 -05:00
container.go Add semconv/v1.12.0 (#3010) 2022-07-13 09:55:43 -04:00
doc.go Prerelease v1.0.0 (#2250) 2021-09-20 13:02:46 -07:00
env_test.go Decode values from OTEL_RESOURCE_ATTRIBUTES (#2963) 2022-10-19 09:13:20 -07:00
env.go Decode values from OTEL_RESOURCE_ATTRIBUTES (#2963) 2022-10-19 09:13:20 -07:00
export_common_unix_test.go Use ByteSliceToString from golang.org/x/sys/unix (#2924) 2022-05-26 07:31:35 -07:00
export_os_release_darwin_test.go OS description attribute detector (#1840) 2021-07-08 13:35:27 -07:00
export_test.go Add container id support to Resource (#2418) 2022-03-03 12:13:31 -05:00
export_unix_test.go Bump github.com/jcchavezs/porto from 0.2.1 to 0.3.0 in /internal/tools (#2288) 2021-10-15 11:36:56 -07:00
export_windows_test.go OS description attribute detector (#1840) 2021-07-08 13:35:27 -07:00
os_release_darwin_test.go OS description attribute detector (#1840) 2021-07-08 13:35:27 -07:00
os_release_darwin.go OS description attribute detector (#1840) 2021-07-08 13:35:27 -07:00
os_release_unix_test.go Bump github.com/jcchavezs/porto from 0.2.1 to 0.3.0 in /internal/tools (#2288) 2021-10-15 11:36:56 -07:00
os_release_unix.go Bump github.com/jcchavezs/porto from 0.2.1 to 0.3.0 in /internal/tools (#2288) 2021-10-15 11:36:56 -07:00
os_test.go Add semconv/v1.12.0 (#3010) 2022-07-13 09:55:43 -04:00
os_unix_test.go Replace ioutil with io and os (#3058) 2022-08-03 14:45:05 -07:00
os_unix.go Use ByteSliceToString from golang.org/x/sys/unix (#2924) 2022-05-26 07:31:35 -07:00
os_unsupported.go OS description attribute detector (#1840) 2021-07-08 13:35:27 -07:00
os_windows_test.go OS description attribute detector (#1840) 2021-07-08 13:35:27 -07:00
os_windows.go OS description attribute detector (#1840) 2021-07-08 13:35:27 -07:00
os.go Add semconv/v1.12.0 (#3010) 2022-07-13 09:55:43 -04:00
process_test.go Use already enabled revive linter and add depguard (#2883) 2022-05-19 15:15:07 -05:00
process.go Add semconv/v1.12.0 (#3010) 2022-07-13 09:55:43 -04:00
resource_test.go Add semconv/v1.12.0 (#3010) 2022-07-13 09:55:43 -04:00
resource.go Use already enabled revive linter and add depguard (#2883) 2022-05-19 15:15:07 -05:00