Skip to content

Commit

Permalink
Merge branch 'fix/update-configs'
Browse files Browse the repository at this point in the history
  • Loading branch information
ermasafira committed Nov 17, 2024
2 parents dfa492b + a888de0 commit 48a52a1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/otel/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func initTracerProvider(ctx context.Context, res *resource.Resource) *sdktrace.T
}

tp := sdktrace.NewTracerProvider(
// sdktrace.WithSampler(sdktrace.AlwaysSample()),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
sdktrace.WithResource(res),
sdktrace.WithBatcher(exp),
)
Expand All @@ -84,9 +84,7 @@ func initMeterProvider(ctx context.Context, res *resource.Resource) *sdkmetric.M
mp := sdkmetric.NewMeterProvider(
sdkmetric.WithReader(
sdkmetric.NewPeriodicReader(
exp,
// Default is 1m. Set to 3s for demonstrative purposes.
sdkmetric.WithInterval(3*time.Second),
exp, sdkmetric.WithInterval(3*time.Minute),
),
),
sdkmetric.WithResource(res),
Expand All @@ -103,7 +101,9 @@ func initLoggerProvider(ctx context.Context, res *resource.Resource) *sdklogger.
log.Fatal(ctx, "error init logger provider", err)
}
lp := sdklogger.NewLoggerProvider(
sdklogger.WithProcessor(sdklogger.NewBatchProcessor(exp)),
sdklogger.WithProcessor(sdklogger.NewBatchProcessor(
exp, sdklogger.WithExportInterval(3*time.Minute),
)),
sdklogger.WithResource(res),
)

Expand Down

0 comments on commit 48a52a1

Please sign in to comment.