otlp

package
v0.0.0-...-1ce6954 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingKustoMetadata = errors.New("missing kusto metadata")
	ErrMalformedLogs        = errors.New("malformed log records")
)
View Source
var (
	// ErrUnknownMetricType is returned when a metric type is not known by this implementation.
	ErrUnknownMetricType = errors.New("received unknown metric type")
)

Functions

This section is empty.

Types

type ErrRejectedMetric

type ErrRejectedMetric struct {
	Msg   string
	Count int64
}

ErrRejectedMetric is returned when a write is successful, but some metrics were rejected because they were not able to be handled. Example situation is sending unsupported metric types.

func (*ErrRejectedMetric) Error

func (e *ErrRejectedMetric) Error() string

type ErrWriteError

type ErrWriteError struct {
	Err error
}

ErrWriteError is returned when a write fails to the remote. Retriable type of error.

func (*ErrWriteError) Error

func (e *ErrWriteError) Error() string

func (*ErrWriteError) Unwrap

func (e *ErrWriteError) Unwrap() error

type LogsProxyService

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

func NewLogsProxyService

func NewLogsProxyService(opts LogsProxyServiceOpts) *LogsProxyService

func (*LogsProxyService) Close

func (s *LogsProxyService) Close() error

func (*LogsProxyService) Handler

func (s *LogsProxyService) Handler(w http.ResponseWriter, r *http.Request)

func (*LogsProxyService) Open

type LogsProxyServiceOpts

type LogsProxyServiceOpts struct {
	AddAttributes      map[string]string
	LiftAttributes     []string
	Endpoints          []string
	InsecureSkipVerify bool
}

type LogsService

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

func NewLogsService

func NewLogsService(opts LogsServiceOpts) *LogsService

func (*LogsService) Close

func (s *LogsService) Close() error

func (*LogsService) Handler

func (s *LogsService) Handler(w http.ResponseWriter, r *http.Request)

func (*LogsService) Open

func (s *LogsService) Open(ctx context.Context) error

type LogsServiceOpts

type LogsServiceOpts struct {
	Store         storage.Store
	AddAttributes map[string]string
}

type MetricWriter

type MetricWriter interface {
	Write(ctx context.Context, msg *v1.ExportMetricsServiceRequest) error
}

type MetricsService

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

func NewMetricsService

func NewMetricsService(writer MetricWriter, path string, grpcPort int) *MetricsService

func (*MetricsService) Export

Export implements metricsv1connect.MetricsServiceHandler to handle OLTP/GRPC metrics requests

func (*MetricsService) Handler

func (s *MetricsService) Handler(w http.ResponseWriter, r *http.Request)

Handler handles OTLP/HTTP metrics requests See https://opentelemetry.io/docs/specs/otlp/#otlphttp

type OltpMetricWriter

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

func NewOltpMetricWriter

func NewOltpMetricWriter(opts OltpMetricWriterOpts) *OltpMetricWriter

func (*OltpMetricWriter) Write

Write takes an OTLP ExportMetricsServiceRequest and writes it to the configured endpoints.

type OltpMetricWriterOpts

type OltpMetricWriterOpts struct {
	RequestTransformer *transform.RequestTransformer

	DisableMetricsForwarding bool

	// MaxBatchSize is the maximum number of samples to send in a single batch.
	MaxBatchSize int

	Endpoints []string

	Client *promremote.Client
}

Jump to

Keyboard shortcuts

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