trace

package
v1.8.9 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: BSD-3-Clause Imports: 16 Imported by: 2 modules, 14 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ExporterConfig `json:"exporterConfig"`

	// Used to flag if tracing should be performed
	Enabled bool `json:"enabled"`

	// The fraction of traces to sample.
	// If >= 1 always samples.
	// If <= 0 never samples.
	TraceSampleRate float64 `json:"traceSampleRate"`
}

type ExporterConfig

type ExporterConfig struct {
	Type ExporterType `json:"type"`

	// Endpoint to send metrics to
	Endpoint string `json:"endpoint"`

	// Headers to send with metrics
	Headers map[string]string `json:"headers"`

	// If true, don't use TLS
	Insecure bool `json:"insecure"`
}

type ExporterType

type ExporterType byte
const (
	GRPC ExporterType = iota + 1
	HTTP
)

func ExporterTypeFromString

func ExporterTypeFromString(exporterTypeStr string) (ExporterType, error)

func (ExporterType) MarshalJSON

func (t ExporterType) MarshalJSON() ([]byte, error)

func (ExporterType) String

func (t ExporterType) String() string

type Tracer

type Tracer interface {
	trace.Tracer
	io.Closer
}

func New

func New(config Config) (Tracer, error)

Jump to

Keyboard shortcuts

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