Skip to content

Commit

Permalink
optimize opentelemetry logic initial
Browse files Browse the repository at this point in the history
  • Loading branch information
alimy committed Feb 7, 2024
1 parent 5bb9a86 commit b462718
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/conf/opentelemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
sdkmetric "go.opentelemetry.io/otel/sdk/metric"
sdkresource "go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.24.0"
)

var (
Expand Down Expand Up @@ -47,10 +48,9 @@ func initResource() *sdkresource.Resource {
initResourcesOnce.Do(func() {
extraResources, _ := sdkresource.New(
context.Background(),
sdkresource.WithOS(),
sdkresource.WithProcess(),
sdkresource.WithContainer(),
sdkresource.WithHost(),
sdkresource.WithSchemaURL(semconv.SchemaURL),
)
resource, _ = sdkresource.Merge(
sdkresource.Default(),
Expand Down

0 comments on commit b462718

Please sign in to comment.