otlp

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 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. Note: This function consume the record.

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