detect

package
v0.17.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 22 Imported by: 92

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServiceName string
)

Functions

func IsNoneMetricExporter added in v0.14.0

func IsNoneMetricExporter(exp sdkmetric.Exporter) bool

func IsNoneSpanExporter added in v0.14.0

func IsNoneSpanExporter(exp sdktrace.SpanExporter) bool

func NewMetricExporter added in v0.14.0

func NewMetricExporter(_ context.Context) (sdkmetric.Exporter, error)

func NewSpanExporter added in v0.14.0

func NewSpanExporter(_ context.Context) (sdktrace.SpanExporter, error)

func OverrideResource added in v0.13.0

func OverrideResource(res *resource.Resource)

OverrideResource overrides the resource returned from Resource.

This must be invoked before Resource is called otherwise it is a no-op.

func Register

func Register(name string, exp ExporterDetector, priority int)

func Resource added in v0.12.5

func Resource() *resource.Resource

Types

type ExporterDetector

type ExporterDetector interface {
	DetectTraceExporter() (sdktrace.SpanExporter, error)
	DetectMetricExporter() (sdkmetric.Exporter, error)
}

type TraceExporterDetector added in v0.14.0

type TraceExporterDetector func() (sdktrace.SpanExporter, error)

func (TraceExporterDetector) DetectMetricExporter added in v0.14.0

func (fn TraceExporterDetector) DetectMetricExporter() (sdkmetric.Exporter, error)

func (TraceExporterDetector) DetectTraceExporter added in v0.14.0

func (fn TraceExporterDetector) DetectTraceExporter() (sdktrace.SpanExporter, error)

type TraceRecorder added in v0.11.0

type TraceRecorder struct {
	// contains filtered or unexported fields
}
var Recorder *TraceRecorder

func NewTraceRecorder added in v0.11.0

func NewTraceRecorder() *TraceRecorder

func (*TraceRecorder) ExportSpans added in v0.11.0

func (r *TraceRecorder) ExportSpans(ctx context.Context, spans []sdktrace.ReadOnlySpan) error

func (*TraceRecorder) Record added in v0.11.0

func (r *TraceRecorder) Record(ctx context.Context) (func() []tracetest.SpanStub, error)

Record signals to the TraceRecorder that it should track spans associated with the current trace and returns a function that will return these spans.

If the TraceRecorder is nil or there is no valid active span, the returned function will be nil to signal that the trace cannot be recorded.

func (*TraceRecorder) Shutdown added in v0.11.0

func (r *TraceRecorder) Shutdown(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL