mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-23 19:49:13 +02:00
Refactor trace config to match supported otel options
This commit is contained in:
parent
c307ca806a
commit
c510edf364
21 changed files with 991 additions and 701 deletions
|
@ -323,6 +323,7 @@ func New(t testing.TB, opts ...EnvironmentOption) Environment {
|
|||
pauseOnFailure: *flagPauseOnFailure,
|
||||
forceSilent: *flagSilent,
|
||||
traceDebugFlags: trace.DebugFlags(defaultTraceDebugFlags),
|
||||
traceClient: trace.NoopClient{},
|
||||
}
|
||||
options.apply(opts...)
|
||||
if testing.Short() {
|
||||
|
@ -368,9 +369,8 @@ func New(t testing.TB, opts ...EnvironmentOption) Environment {
|
|||
logger := zerolog.New(writer).With().Timestamp().Logger().Level(zerolog.DebugLevel)
|
||||
|
||||
ctx := trace.Options{
|
||||
DebugFlags: options.traceDebugFlags,
|
||||
RemoteClient: options.traceClient,
|
||||
}.NewContext(logger.WithContext(context.Background()))
|
||||
DebugFlags: options.traceDebugFlags,
|
||||
}.NewContext(logger.WithContext(context.Background()), options.traceClient)
|
||||
tracerProvider := trace.NewTracerProvider(ctx, "Test Environment")
|
||||
tracer := tracerProvider.Tracer(trace.PomeriumCoreTracer)
|
||||
ctx, span := tracer.Start(ctx, t.Name(), oteltrace.WithNewRoot())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue