model

package
v0.110.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OtelSpanType = "otel"

	InstanaSpanKindServer   = "server"
	InstanaSpanKindClient   = "client"
	InstanaSpanKindProducer = "producer"
	InstanaSpanKindConsumer = "consumer"
	InstanaSpanKindInternal = "internal"

	InstanaDataError       = "error"
	InstanaDataErrorDetail = "error_detail"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchInfo

type BatchInfo struct {
	Size int `json:"s"`
}

type Bundle

type Bundle struct {
	Spans []Span `json:"spans,omitempty"`
}

func NewBundle

func NewBundle() Bundle

func (*Bundle) Marshal

func (b *Bundle) Marshal() ([]byte, error)

type FromS

type FromS struct {
	EntityID string `json:"e"`
	// Serverless agents fields
	Hostless      bool   `json:"hl,omitempty"`
	CloudProvider string `json:"cp,omitempty"`
	// Host agent fields
	HostID string `json:"h,omitempty"`
}

type OTelSpanData

type OTelSpanData struct {
	Kind           string            `json:"kind"`
	HasTraceParent bool              `json:"tp,omitempty"`
	ServiceName    string            `json:"service"`
	Operation      string            `json:"operation"`
	TraceState     string            `json:"trace_state,omitempty"`
	Tags           map[string]string `json:"tags,omitempty"`
	Resource       map[string]string `json:"resource,omitempty"`
}

type Span

type Span struct {
	TraceReference

	SpanID          string          `json:"s"`
	LongTraceID     string          `json:"lt,omitempty"`
	Timestamp       uint64          `json:"ts"`
	Duration        uint64          `json:"d"`
	Name            string          `json:"n"`
	From            *FromS          `json:"f"`
	Batch           *BatchInfo      `json:"b,omitempty"`
	Ec              int             `json:"ec,omitempty"`
	Synthetic       bool            `json:"sy,omitempty"`
	CorrelationType string          `json:"crtp,omitempty"`
	CorrelationID   string          `json:"crid,omitempty"`
	ForeignTrace    bool            `json:"tp,omitempty"`
	Ancestor        *TraceReference `json:"ia,omitempty"`
	Data            OTelSpanData    `json:"data,omitempty"`
}

func ConvertPDataSpanToInstanaSpan

func ConvertPDataSpanToInstanaSpan(fromS FromS, otelSpan ptrace.Span, serviceName string, attributes pcommon.Map) (Span, error)

type TraceReference

type TraceReference struct {
	TraceID  string `json:"t"`
	ParentID string `json:"p,omitempty"`
}

Jump to

Keyboard shortcuts

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