Documentation ¶
Index ¶
- func CreateExporter(cfg configmodels.Telemetry) (exporter tracesdk.SpanExporter, err error)
- func NewTraceProvider(ctx context.Context, cfg configmodels.Telemetry, ...) (*trace.TracerProvider, error)
- func SetupTelemetryProvider(ctx context.Context, exporter trace.SpanExporter, sampler trace.Sampler, ...) (*trace.TracerProvider, error)
- func WithError(span trace.Span, err error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateExporter ¶
func CreateExporter(cfg configmodels.Telemetry) (exporter tracesdk.SpanExporter, err error)
CreateExporter returns an exporter based on the configmodels data.
func NewTraceProvider ¶
func NewTraceProvider( ctx context.Context, cfg configmodels.Telemetry, attributes ...attribute.KeyValue, ) (*trace.TracerProvider, error)
NewTraceProvider creates the actual exporter based on the config, certain options are only supported with an insecure option, if you have a pre-defined exporter use SetupTelemetryProvider instead.
func SetupTelemetryProvider ¶
func SetupTelemetryProvider( ctx context.Context, exporter trace.SpanExporter, sampler trace.Sampler, attributes ...attribute.KeyValue, ) (*trace.TracerProvider, error)
SetupTelemetryProvider creates a telemetry provider with the following resources FromEnv, TelemetrySDK, Host(), ProcessExecutablePath(), ProcessOwner(), ProcessPID(), and custom defined attributes passed.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.