otel

package
v0.0.0-...-7973e12 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
}

type Otel

type Otel struct {
	*Config
	Traces  *OTelSvc
	Logs    *OTelSvcLogs
	Metrics *OTelSvcMetrics
}

Receives otel spans, metrics and logs using gRPC protocol. Currently, it just logs to slog - the intent is to provide a circular buffer and allow getting the data for debug and tools.

Similar to `otel-cli server json --endpoint http://0.0.0.0:4318 --stdout` - but for all

Test with

otel-cli span --name "my-span" --start 1622522888 --end 1622523000 --service "my-service" --kind "client" --verbose --endpoint localhost:4317
otel-cli span --name "my-span" --start 1622522888 --end 1622523000 --service "my-service" --kind "client" --verbose --endpoint http://localhost:4318

func NewOtel

func NewOtel(cfg *Config) *Otel

func (*Otel) HandleHTTP

func (o *Otel) HandleHTTP(writer http.ResponseWriter, req *http.Request)

func (*Otel) Register

func (ot *Otel) Register(mux *http.ServeMux)

Jump to

Keyboard shortcuts

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