Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AttrRPCType = attribute.Key("grip.rpc.type") AttrAdmission = attribute.Key("grip.admission.result") AttrRetryAttempt = attribute.Key("grip.retry.attempt") AttrFailureKind = attribute.Key("grip.failure.kind") )
Common attribute keys for GRIP spans.
Functions ¶
func AdmissionResult ¶
AdmissionResult returns an attribute for the admission result.
func FailureKind ¶
FailureKind returns an attribute for the failure kind.
func RetryAttempt ¶
RetryAttempt returns an attribute for the retry attempt number.
Types ¶
type Option ¶
type Option func(*Tracer)
Option configures the tracer.
func WithTracerProvider ¶
func WithTracerProvider(tp trace.TracerProvider) Option
WithTracerProvider sets a custom TracerProvider.
type Tracer ¶
type Tracer struct {
// contains filtered or unexported fields
}
Tracer wraps OpenTelemetry tracing for GRIP execution pipelines.
It creates spans for each execution, recording:
- RPC type (unary, server-stream, client-stream, bidi-stream)
- Admission decisions
- Supervisor lifecycle events
- Error classification
func NoopTracer ¶
func NoopTracer() *Tracer
NoopTracer returns a tracer that does nothing. Useful for tests and when tracing is not configured.
func (*Tracer) RecordEvent ¶
RecordEvent adds an event to the current span.
Click to show internal directories.
Click to hide internal directories.