Documentation ¶
Overview ¶
Package traces allows for instrumenting osquery-go with OpenTelemetry traces. Unless the consuming application specifically configures a trace exporter, all tracing is a no-op.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OsqueryGoTracer ¶
OsqueryGoTracer provides a tracer with a standardized name and version. It should be used to start a span that requires `SpanStartOption`s that are not supported by `StartSpan` below -- i.e., any `SpanStartOption` besides `WithAttributes`.
func SetTracerProvider ¶
func SetTracerProvider(tp trace.TracerProvider)
SetTracerProvider allows consuming libraries to set a custom/non-global tracer provider.
func StartSpan ¶
func StartSpan(ctx context.Context, spanName string, keyVals ...string) (context.Context, trace.Span)
StartSpan is a wrapper around trace.Tracer.Start that simplifies passing in span attributes. `keyVals` should be a list of pairs, where the first in the pair is a string representing the attribute key and the second in the pair is the attribute value. The caller is always responsible for ending the returned span. Any spans requiring more specific configuration can be created manually via OsqueryGoTracer().Start.
Types ¶
This section is empty.