provider

package
v2.0.0-test2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDGenerator

type IDGenerator struct{}

func NewIDGenerator

func NewIDGenerator() *IDGenerator

func (*IDGenerator) NewIDs

func (id *IDGenerator) NewIDs(ctx context.Context) (traceID trace.TraceID, spanID trace.SpanID)

NewIDs creates and returns a new trace and span ID.

func (*IDGenerator) NewSpanID

func (id *IDGenerator) NewSpanID(ctx context.Context, traceID trace.TraceID) (spanID trace.SpanID)

NewSpanID returns an ID for a new span in the trace with traceID.

type TracerProvider

type TracerProvider struct {
	*sdkTrace.TracerProvider
}

func New

func New() *TracerProvider

New returns a new and configured TracerProvider, which has no SpanProcessor.

In default the returned TracerProvider is configured with:

  • a ParentBased(AlwaysSample) Sampler
  • a unix nano timestamp and random umber based IDGenerator
  • the resource.Default() Resource
  • the default SpanLimits.

The passed opts are used to override these default values and configure the returned TracerProvider appropriately.

Jump to

Keyboard shortcuts

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