instr

package
v0.0.0-...-ada256f Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package instr contains common instrumentation tooling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(config *Config, serviceName string) (func(context.Context), error)

Install configures and installs a Jaeger tracing pipeline. The first returned argument is a flusher, which should be called on program exit.

Types

type Config

type Config struct {
	SamplingRatio  float64 // Parent-based sampling ratio (fraction of sniffed hashes traced).
	JaegerEndpoint string  // Send spans to Jaeger HTTP endpoint.
}

Config specifies the configuration for the instrumentation.

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns the default configuration for the instrumentation.

type Instrumentation

type Instrumentation struct {
	Tracer trace.Tracer
}

Instrumentation provides a canonical representation of instrumentation.

func New

func New() *Instrumentation

New generates a representation of instrumentation containing the globally registered tracer and meter.

Jump to

Keyboard shortcuts

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