opentelemetry

package
v0.0.0-...-2275def Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertOtlpLogRequestToGroupEvents

func ConvertOtlpLogRequestToGroupEvents(otlpLogReq plogotlp.ExportRequest) ([]*models.PipelineGroupEvents, error)

func ConvertOtlpLogRequestV1

func ConvertOtlpLogRequestV1(otlpLogReq plogotlp.ExportRequest) (logs []*protocol.Log, err error)

func ConvertOtlpLogV1

func ConvertOtlpLogV1(otlpLogs plog.Logs) (logs []*protocol.Log, err error)

func ConvertOtlpLogsToGroupEvents

func ConvertOtlpLogsToGroupEvents(logs plog.Logs) (groupEventsSlice []*models.PipelineGroupEvents, err error)

func ConvertOtlpMetricRequestToGroupEvents

func ConvertOtlpMetricRequestToGroupEvents(otlpMetricReq pmetricotlp.ExportRequest) ([]*models.PipelineGroupEvents, error)

func ConvertOtlpMetricRequestV1

func ConvertOtlpMetricRequestV1(otlpMetricReq pmetricotlp.ExportRequest) (logs []*protocol.Log, err error)

func ConvertOtlpMetricV1

func ConvertOtlpMetricV1(otlpMetrics pmetric.Metrics) (logs []*protocol.Log, err error)

func ConvertOtlpMetrics

func ConvertOtlpMetrics(metrics *v1.ResourceMetrics) (logs []*protocol.Log, err error)

func ConvertOtlpMetricsToGroupEvents

func ConvertOtlpMetricsToGroupEvents(metrics pmetric.Metrics) (groupEventsSlice []*models.PipelineGroupEvents, err error)

func ConvertOtlpTraceRequestToGroupEvents

func ConvertOtlpTraceRequestToGroupEvents(otlpTraceReq ptraceotlp.ExportRequest) ([]*models.PipelineGroupEvents, error)

func ConvertOtlpTraceRequestV1

func ConvertOtlpTraceRequestV1(otlpTraceReq ptraceotlp.ExportRequest) (logs []*protocol.Log, err error)

func ConvertOtlpTraceV1

func ConvertOtlpTraceV1(otlpTrace ptrace.Traces) (logs []*protocol.Log, err error)

func ConvertOtlpTracesToGroupEvents

func ConvertOtlpTracesToGroupEvents(traces ptrace.Traces) (groupEventsSlice []*models.PipelineGroupEvents, err error)

func ConvertResourceSpans

func ConvertResourceSpans(rs *v1.ResourceSpans, traceIDNeedDecode, spanIDNeedDecode, parentSpanIDNeedDecode bool) ([]*protocol.Log, error)

func ConvertTrace

func ConvertTrace(td ptrace.Traces) ([]*protocol.Log, int)

Special Add

func DecodeOtlpRequest

func DecodeOtlpRequest[P interface {
	UnmarshalProto(data []byte) error
	UnmarshalJSON(data []byte) error
}](des P, data []byte, req *http.Request) (P, error)

DecodeOtlpRequest decodes the data and fills into the otlp logs/metrics/traces export request.

func ExponentialHistogramToLogs

func ExponentialHistogramToLogs(name string, data pmetric.ExponentialHistogramDataPointSlice, aggregationTemporality pmetric.AggregationTemporality, defaultLabels *helper.MetricLabels) (logs []*protocol.Log)

func GaugeToLogs

func GaugeToLogs(name string, data pmetric.NumberDataPointSlice, defaultLabels *helper.MetricLabels) (logs []*protocol.Log)

func HistogramToLogs

func HistogramToLogs(name string, data pmetric.HistogramDataPointSlice, aggregationTemporality pmetric.AggregationTemporality, defaultLabels *helper.MetricLabels) (logs []*protocol.Log)

func SumToLogs

func SumToLogs(name string, aggregationTemporality pmetric.AggregationTemporality, isMonotonic string, data pmetric.NumberDataPointSlice, defaultLabels *helper.MetricLabels) (logs []*protocol.Log)

func SummaryToLogs

func SummaryToLogs(name string, data pmetric.SummaryDataPointSlice, defaultLabels *helper.MetricLabels) (logs []*protocol.Log)

Types

type Decoder

type Decoder struct {
	Format string
}

Decoder impl

func (*Decoder) Decode

func (d *Decoder) Decode(data []byte, req *http.Request, tags map[string]string) (logs []*protocol.Log, err error)

Decode impl

func (*Decoder) DecodeV2

func (d *Decoder) DecodeV2(data []byte, req *http.Request) (groups []*models.PipelineGroupEvents, err error)

DecodeV2 impl

func (*Decoder) ParseRequest

func (d *Decoder) ParseRequest(res http.ResponseWriter, req *http.Request, maxBodySize int64) (data []byte, statusCode int, err error)

ParseRequest impl

Jump to

Keyboard shortcuts

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