package
0.0.0-20241208190318-80fc79a84806
Repository: https://github.com/grevych/gobox.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
AddInfo updates the current span with the provided fields.
AddSpanInfo updates the current span with the provided fields.
AsGRPCCall changes the call type to gRPC.
AsHTTPCall changes the call type to HTTP.
AsOutboundCall changes the call type to Outbound.
CloseTracer stops all tracing and sends any queued traces.
CommonProps sets up common properties for traces in cli apps.
End ends a span (or a trace started via StartTrace).
EndCall calculates the duration of the call, writes to metrics, standard logs and closes the trace span.
Deprecated: Use CloseTracer() instead.
Error is a convenience for attaching an error to a span.
ForceTracing will enforce tracing for processing started with returned context and all downstream services that will be invoken on the way.
FromHeaders fetches trace info from a headers map and starts a new Span on top of the extracted span context (which can be either local or remote).
GetTraceStateSampleRate fetches the sample rate from the tracestate.
ID returns an ID for use with external services to propagate tracing context.
IDs returns a log-compatible tracing scope (IDs) data built from the context suitable for logging.
InitTracer starts all tracing infrastructure.
NewForceTraceHeaderSampler wraps an existing sampler with support for the X-Force-Trace header, with the help of the `isTracingForced` context flag.
NewHandler creates a new handlers which reads propagated headers from the current trace context.
NewHoneycombDeterministicSampler returns a sampler that mimics the deterministic sampler behavior from Honeycomb's beeline libraries.
NewLogFileExporter Creates a new exporter that sends all spans to the passed in port on localhost.
NewLogFileTracer initializes a tracer that sends traces to a log file.
NewOtelTracer creates and initializes a new otel tracer.
NewSampleRateTaggingSampler is a sampler that doesn't actually make sampling decisions.
NewTransport creates a new transport which propagates the current trace context.
No description provided by the author
SetCallError is deprecated and will directly call into SetCallStatus for backward compatibility.
SetCallStatus can be optionally called to set status of the call.
Deprecated: use AsGrpcCall call.Option instead SetTypeGRPC is meant to set the call type to GRPC on a context that has already been initialized for tracing via StartCall or StartExternalCall.
Deprecated: use AsHttpCall call.Option instead SetTypeHTTP is meant to set the call type to HTTP on a context that has already been initialized for tracing via StartCall or StartExternalCall.
Deprecated: use AsOutboundCall call.Option instead SetCallTypeOutbound is meant to set the call type to Outbound on a context that has already been initialized for tracing via StartCall or StartExternalCall.
SetCustomCallKind is meant to alter the Kind property of a traced call.
SetSpanProcessorHook sets a hook to run when a span ends.
SetTraceStateSampleRate sets the sample rate in the tracestate.
SpanID returns the root tracing SpanID for use when it is needed to correlate the logs belonging to same flow.
StartCall is used to start an internal call.
StartSpan starts a new span.
Deprecated: use StartSpan() instead.
StartSpanWithOptions starts a new span, with extra start options (such as links to external spans).
Deprecated: use StartSpan() instead.
Deprecated: Use InitTracer() instead.
ToHeaders writes the current trace context into a headers map
Only use for GRPC.
SetCallOptions sets the provided call options on the current call in the provided context.
WithInfoLoggingDisabled disables info logging on the current call.
WithInfoLoggingEnabled enables info logging on the current call
Note that the default behavior is configurable.
WithLink links an external span to the current one.
WithScheduledTime sets the call scheduled time to the provided time.
# Constants
Header that enforces the tracing for particular request.
Header used by OpenTelemetry to propagate traces.
# Structs
Annotator is a SpanProcessor that adds service-level tags on every span.
Config is the tracing config that gets read from trace.yaml.
GlobalTags are tags that get included with every span.
No description provided by the author
Link implements SpanStartOption.
LogFile is the configuration for log file based tracing.
LogFileSpanExporter an exporter that sends all traces across the configured connection.
Otel is the configuration for OpenTelemetry based tracing.
# Interfaces
SpanStartOption is an interface for various options to be provided during span creation (StartSpan).
# Type aliases
CallOptions contains options for all tracing calls.