Help us shape the future of Go! Take the 2026 Go Developer Survey

otel

package
v1.17.17 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	coltracepb.UnimplementedTraceServiceServer
	// contains filtered or unexported fields
}

Collector is an in-memory OTLP collector for testing.

func New

func New(t *testing.T, fopts ...Option) *Collector

func (*Collector) Cleanup

func (c *Collector) Cleanup(t *testing.T)

Cleanup implements framework.Process

func (*Collector) Export

Export implements the OTLP trace service Export method

func (*Collector) ExportTraces

ExportTraces implements the OTLP trace service ExportTraces method

func (*Collector) GRPCDaprdConfiguration added in v1.17.0

func (c *Collector) GRPCDaprdConfiguration(t *testing.T) daprd.Option

func (*Collector) GRPCProvider added in v1.17.0

func (c *Collector) GRPCProvider(t *testing.T, ctx context.Context) *sdktrace.TracerProvider

func (*Collector) GetHeaders added in v1.17.0

func (c *Collector) GetHeaders() metadata.MD

GetHeaders returns the gRPC metadata received from the last Export request.

func (*Collector) GetSpans

func (c *Collector) GetSpans() []*tracepb.ResourceSpans

GetSpans returns a copy of all received spans

func (*Collector) OTLPGRPCAddress

func (c *Collector) OTLPGRPCAddress() string

OTLPGRPCAddress returns the gRPC endpoint address for the collector

func (*Collector) Run

func (c *Collector) Run(t *testing.T, ctx context.Context)

func (*Collector) TraceSpans added in v1.17.0

func (c *Collector) TraceSpans(traceID trace.TraceID) []*tracepb.Span

func (*Collector) WaitUntilRunning

func (c *Collector) WaitUntilRunning(t *testing.T, ctx context.Context)

type Option

type Option func(*options)

Option is a function that configures the process.

Jump to

Keyboard shortcuts

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