Documentation
¶
Overview ¶
Package observability provides abstractions for tracing, metrics, etc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommentFromSpanContext ¶
func CommentFromSpanContext(sc oteltrace.SpanContext) (string, error)
CommentFromSpanContext creates a json-encoded string with tracing information (see commentData) from span context.
func SpanContextFromComment ¶
func SpanContextFromComment(comment string) (oteltrace.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 invalid span context and no error.
Types ¶
type OTelTraceExporter ¶
type OTelTraceExporter struct {
// contains filtered or unexported fields
}
OTelTraceExporter represents the OTLP trace exporter using HTTP with protobuf payloads.
func NewOTelTraceExporter ¶
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 ¶
func (ot *OTelTraceExporter) Run(ctx context.Context)
Run runs OTLP trace exporter until ctx is canceled.
type OTelTraceExporterOpts ¶
OTelTraceExporterOpts represents OTelTraceExporter options.