Documentation
¶
Overview ¶
Package observability provides abstractions for tracing, metrics, etc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommentFromSpanContext ¶ added in v1.24.0
func CommentFromSpanContext(sc trace.SpanContext) (string, error)
CommentFromSpanContext creates a json-encoded string with tracing information (see commentData) from span context.
func SpanContextFromComment ¶ added in v1.24.0
func SpanContextFromComment(comment string) (trace.SpanContext, error)
SpanContextFromComment extracts OpenTelemetry tracing information from an operation comment. The comment is expected to be a json string (see commentData).
If the comment is empty, it returns an empty span context and no error.
Types ¶
type OTelTraceExporter ¶ added in v1.23.0
type OTelTraceExporter struct {
// contains filtered or unexported fields
}
OTelTraceExporter represents the OTLP trace exporter using HTTP with protobuf payloads.
func NewOTelTraceExporter ¶ added in v1.23.0
func NewOTelTraceExporter(opts *OTelTraceExporterOpts) (*OTelTraceExporter, error)
NewOTelTraceExporter sets up OTelTraceExporter and global tracer provider that is available via `otel.Tracer("")`.
It must be called only once.
func (*OTelTraceExporter) Run ¶ added in v1.23.0
func (ot *OTelTraceExporter) Run(ctx context.Context)
Run runs OTLP trace exporter until ctx is canceled.
type OTelTraceExporterOpts ¶ added in v1.23.0
OTelTraceExporterOpts represents OTelTraceExporter options.