otel

package
v1.0.10184-822ca07 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package otel contains an o11y.Provider that emits open telemetry gRPC. N.B. This has not been tried against a production collector, so we need to try it out on a safe / non production traffic service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(conf Config) (o11y.Provider, error)

Types

type Annotator

type Annotator struct {
	// contains filtered or unexported fields
}

Annotator is a SpanProcessor that adds attributes to all started spans.

func (Annotator) ForceFlush

func (a Annotator) ForceFlush(context.Context) error

func (Annotator) OnEnd

func (a Annotator) OnEnd(s sdktrace.ReadOnlySpan)

func (Annotator) OnStart

func (Annotator) Shutdown

func (a Annotator) Shutdown(context.Context) error

type Config

type Config struct {
	o11yconf.Config

	Dataset         string
	GrpcHostAndPort string
}

type OTel

type OTel struct {
	// contains filtered or unexported fields
}

func (OTel) AddField

func (o OTel) AddField(ctx context.Context, key string, val interface{})

func (OTel) AddFieldToTrace

func (o OTel) AddFieldToTrace(ctx context.Context, key string, val interface{})

func (OTel) AddGlobalField

func (o OTel) AddGlobalField(key string, val interface{})

func (OTel) Close

func (o OTel) Close(ctx context.Context)

func (OTel) GetSpan

func (o OTel) GetSpan(ctx context.Context) o11y.Span

func (OTel) Helpers

func (o OTel) Helpers() o11y.Helpers

func (OTel) Log

func (o OTel) Log(ctx context.Context, name string, fields ...o11y.Pair)

func (OTel) MetricsProvider

func (o OTel) MetricsProvider() o11y.MetricsProvider

func (*OTel) RawProvider

func (o *OTel) RawProvider() *OTel

RawProvider satisfies an interface the helpers need

func (OTel) StartSpan

func (o OTel) StartSpan(ctx context.Context, name string) (context.Context, o11y.Span)

Directories

Path Synopsis
Package texttrace is a span exporter for otel that outputs to the ex text console format
Package texttrace is a span exporter for otel that outputs to the ex text console format

Jump to

Keyboard shortcuts

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