Quiz: Monitoring and Observability
Test yourself on what you have learned so far.
1
What is the purpose of the initOpenTelemetry()
method in the provided code?
func (s *System) initOpenTelemetry() error {
exporter, err := otlptracegrpc.New(
context.Background(),
)
if err != nil { return err }
s.tp = sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
)
otel.SetTracerProvider(s.tp)
otel.SetTextMapPropagator(
propagation.NewCompositeTextMapPropagator(
propagation.TraceContext{},
propagation.Baggage{},
),
)
return nil
}
A)
To configure tracing settings for the OpenTelemetry SDK
B)
To initialize a connection to the OpenTelemetry collector using gRPC
C)
To set up environment variables for the OpenTelemetry configuration
D)
To define custom propagation rules for trace context and baggage
Question 1 of 50 attempted
Get hands-on with 1400+ tech skills courses.