telemetry

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: MPL-2.0 Imports: 9 Imported by: 0

README

telemetry

Opentracing factory to setup by multiples vendors.

Usage

telemetry.InitTracer(
    telemetry.WithJaeger(os.Getenv("APP_NAME")),
    telemetry.WithDatadog(logger, &telemetry.DatadogOptions{
        Service: os.Getenv("APP_NAME"),
        Env:     os.Getenv("DD_ENV"),
        Port:    os.Getenv("DD_TRACE_AGENT_PORT"),
        Host:    os.Getenv("DD_AGENT_HOST"),
        Version: os.Getenv("DD_VERSION"),
    }),
)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitTracer

func InitTracer(options ...TracerOption) opentracing.Tracer

Types

type DatadogOptions

type DatadogOptions struct {
	Service, Env, Port, Host, Version string
}

type TracerOption

type TracerOption func(opentracing.Tracer) opentracing.Tracer

func WithDatadog

func WithDatadog(log hclog.Logger, options *DatadogOptions) TracerOption

func WithJaeger

func WithJaeger(name string) TracerOption

Jump to

Keyboard shortcuts

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