otlp

package
v0.24.0 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: 12 Imported by: 0

Documentation

Overview

Package otlp contains types and functions used to convert OTLP Arrow logs into their OTLP representation.

Index

Constants

View Source
const None = -1

Variables

View Source
var (
	ErrBodyNotSparseUnion = errors.New("body is not a sparse union")
)

Functions

func LogsFrom

func LogsFrom(record arrow.Record, relatedData *RelatedData) (plog.Logs, error)

LogsFrom creates a plog.Logs from the given Arrow Record.

Important Note: This function doesn't take ownership of the record, so the record must be released by the caller.

Types

type LogRecordIDs

type LogRecordIDs struct {
	ID                   int // Numerical ID of the current span
	Resource             *otlp.ResourceIds
	Scope                *otlp.ScopeIds
	SchemaUrl            int
	TimeUnixNano         int
	ObservedTimeUnixNano int
	TraceID              int
	SpanID               int
	SeverityNumber       int
	SeverityText         int

	Body       int
	BodyType   int
	BodyStr    int
	BodyInt    int
	BodyDouble int
	BodyBool   int
	BodyBytes  int
	BodySer    int

	DropAttributesCount int
	Flags               int
}

func SchemaToIDs

func SchemaToIDs(schema *arrow.Schema) (*LogRecordIDs, error)

type RelatedData

type RelatedData struct {
	LogRecordID           uint16
	ResAttrMapStore       *otlp.Attributes16Store
	ScopeAttrMapStore     *otlp.Attributes16Store
	LogRecordAttrMapStore *otlp.Attributes16Store
}

func NewRelatedData

func NewRelatedData() *RelatedData

func RelatedDataFrom

func RelatedDataFrom(records []*record_message.RecordMessage) (relatedData *RelatedData, logsRecord *record_message.RecordMessage, err error)

func (*RelatedData) LogRecordIDFromDelta

func (r *RelatedData) LogRecordIDFromDelta(delta uint16) uint16

Jump to

Keyboard shortcuts

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