You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-11-27 22:49:15 +02:00
As discussed in a previous SIG meeting, this PR adds support for setting a default value for [`service.instance.id`](https://github.com/open-telemetry/semantic-conventions/tree/main/docs/resource#service-experimental) according to semantic conventions: > Implementations, such as SDKs, are recommended to generate a random Version 1 or Version 4 [RFC 4122](https://www.ietf.org/rfc/rfc4122.txt) UUID, but are free to use an inherent unique ID as the source of this value if stability is desirable. In that case, the ID SHOULD be used as source of a UUID Version 5 and SHOULD use the following UUID as the namespace: `4d63009a-8d0f-11ee-aad7-4c796ed8e320`. This PR follows the recommendation and populates `service.instance.id` with a random Version 4 UUID. The functionality is guarded by the `OTEL_GO_X_RESOURCE` feature flag environment variable. There are plans to declare `service.instance.id` stable and also make it a required attribute (similar to `service.name`). Once this happens, the functionality can be made available regardless of whether `OTEL_GO_X_RESOURCE` is set. Closes https://github.com/open-telemetry/opentelemetry-go-contrib/issues/5423 --------- Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> Co-authored-by: Tyler Yahn <codingalias@gmail.com>
40 lines
1.3 KiB
Modula-2
40 lines
1.3 KiB
Modula-2
module go.opentelemetry.io/otel/example/opencensus
|
|
|
|
go 1.21
|
|
|
|
replace (
|
|
go.opentelemetry.io/otel => ../..
|
|
go.opentelemetry.io/otel/bridge/opencensus => ../../bridge/opencensus
|
|
go.opentelemetry.io/otel/sdk => ../../sdk
|
|
)
|
|
|
|
require (
|
|
go.opencensus.io v0.24.0
|
|
go.opentelemetry.io/otel v1.27.0
|
|
go.opentelemetry.io/otel/bridge/opencensus v1.27.0
|
|
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0
|
|
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0
|
|
go.opentelemetry.io/otel/sdk v1.27.0
|
|
go.opentelemetry.io/otel/sdk/metric v1.27.0
|
|
)
|
|
|
|
require (
|
|
github.com/go-logr/logr v1.4.2 // indirect
|
|
github.com/go-logr/stdr v1.2.2 // indirect
|
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
|
github.com/google/uuid v1.6.0 // indirect
|
|
go.opentelemetry.io/otel/metric v1.27.0 // indirect
|
|
go.opentelemetry.io/otel/trace v1.27.0 // indirect
|
|
golang.org/x/sys v0.21.0 // indirect
|
|
)
|
|
|
|
replace go.opentelemetry.io/otel/metric => ../../metric
|
|
|
|
replace go.opentelemetry.io/otel/sdk/metric => ../../sdk/metric
|
|
|
|
replace go.opentelemetry.io/otel/trace => ../../trace
|
|
|
|
replace go.opentelemetry.io/otel/exporters/stdout/stdoutmetric => ../../exporters/stdout/stdoutmetric
|
|
|
|
replace go.opentelemetry.io/otel/exporters/stdout/stdouttrace => ../../exporters/stdout/stdouttrace
|