otlptest

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPServer

type HTTPServer struct {
	*httptest.Server
	Trace   *TraceService
	Metrics *MetricsService
	Logs    *LogsService
}

func NewHTTPServer

func NewHTTPServer(mux *otlp.ServerMux) *HTTPServer

func NewUnstartedHTTPServer

func NewUnstartedHTTPServer(mux *otlp.ServerMux) *HTTPServer

func (*HTTPServer) Close

func (s *HTTPServer) Close()

func (*HTTPServer) Start

func (s *HTTPServer) Start()

type LogsService

type LogsService struct {
	EndpointURL string
	Protocol    string
	// contains filtered or unexported fields
}

func (*LogsService) Exporter

func (s *LogsService) Exporter(opts ...any) (log.Exporter, error)

func (*LogsService) Provider

func (s *LogsService) Provider(opts ...any) (*log.LoggerProvider, error)

type MetricsService

type MetricsService struct {
	EndpointURL string
	Protocol    string
	// contains filtered or unexported fields
}

func (*MetricsService) Exporter

func (s *MetricsService) Exporter(opts ...any) (metric.Exporter, error)

func (*MetricsService) Provider

func (s *MetricsService) Provider(opts ...any) (*metric.MeterProvider, error)

type Server

type Server struct {
	URL      string
	Listener net.Listener
	Trace    *TraceService
	Metrics  *MetricsService
	Logs     *LogsService
	// contains filtered or unexported fields
}

func NewServer

func NewServer(mux *otlp.ServerMux, opts ...grpc.ServerOption) *Server

func NewUnstartedServer

func NewUnstartedServer(mux *otlp.ServerMux, opts ...grpc.ServerOption) *Server

func (*Server) Close

func (s *Server) Close()

func (*Server) SetLogger added in v0.3.0

func (s *Server) SetLogger(logger *slog.Logger)

func (*Server) Start

func (s *Server) Start()

type TraceService

type TraceService struct {
	EndpointURL string
	Protocol    string
	// contains filtered or unexported fields
}

func (*TraceService) Exporter

func (s *TraceService) Exporter(opts ...any) (*otlptrace.Exporter, error)

func (*TraceService) Provider

func (s *TraceService) Provider(opts ...any) (*trace.TracerProvider, error)

Jump to

Keyboard shortcuts

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