idgenerator

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 4 Imported by: 14

Documentation

Overview

Package idgenerator contains several Span and Trace ID generators which can be used by the Zipkin tracer. Additional third party generators can be plugged in if they adhere to the IDGenerator interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDGenerator

type IDGenerator interface {
	SpanID(traceID model.TraceID) model.ID // Generates a new Span ID
	TraceID() model.TraceID                // Generates a new Trace ID
}

IDGenerator interface can be used to provide the Zipkin Tracer with custom implementations to generate Span and Trace IDs.

func NewRandom128

func NewRandom128() IDGenerator

NewRandom128 returns an ID Generator which can generate 128 bit trace and 64 bit span id's

func NewRandom64

func NewRandom64() IDGenerator

NewRandom64 returns an ID Generator which can generate 64 bit trace and span id's

func NewRandomTimestamped

func NewRandomTimestamped() IDGenerator

NewRandomTimestamped generates 128 bit time sortable traceid's and 64 bit spanid's.

Jump to

Keyboard shortcuts

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