Documentation
¶
Index ¶
- Constants
- type AggregationTemporality
- type DataPoint
- type Entity
- func (e *Entity) AddLog(l *Log) *Entity
- func (e *Entity) AddMetric(m *Metric) *Entity
- func (e *Entity) AddRelationship(r *Relationship) *Entity
- func (e *Entity) AddSpan(l *Span) *Entity
- func (e *Entity) ClearLogs() *Entity
- func (e *Entity) ClearMetrics() *Entity
- func (e *Entity) SetAttribute(key, value string) *Entity
- type Exporter
- type FsocData
- type Log
- type Metric
- type Relationship
- type Resource
- type Span
- type SpanEvent
- type SpanKind
- type SpanLink
- type SpanStatus
- type SpanStatusCode
Constants ¶
const ( // AggregationTemporalityUnspecified - temporality unspecified AggregationTemporalityUnspecified AggregationTemporality = 0 // AggregationTemporalityDelta - temporality delta AggregationTemporalityDelta AggregationTemporality = 1 // AggregationTemporalityCumulative - temporality comulative AggregationTemporalityCumulative AggregationTemporality = 2 // SpanKindUnspecified - unspecified SpanKindUnspecified SpanKind = 0 // SpanKindInternal - intermal SpanKindInternal SpanKind = 1 // SpanKindServer - server SpanKindServer SpanKind = 2 // SpanKindClient - client SpanKindClient SpanKind = 3 // SpanKindProducer - producer SpanKindProducer SpanKind = 4 // SpanKindConsumer - consumer SpanKindConsumer SpanKind = 5 // SpanStatusCodeUnset - unset SpanStatusCodeUnset SpanStatusCode = 0 // SpanStatusCodeOK - unset SpanStatusCodeOK SpanStatusCode = 1 // SpanStatusCodeError - unset SpanStatusCodeError SpanStatusCode = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregationTemporality ¶
type AggregationTemporality int8
AggregationTemporality - aggretation temporality
type Entity ¶
type Entity struct {
TypeName string
ID string `yaml:"id,omitempty"`
Attributes map[string]string
Metrics []*Metric
Logs []*Log
Relationships []*Relationship
Spans []*Span
}
Entity - type for holding entity inforrmation
func (*Entity) AddRelationship ¶
func (e *Entity) AddRelationship(r *Relationship) *Entity
AddRelationship - add a Relationship
func (*Entity) ClearMetrics ¶
ClearMetrics - clear the metrics
func (*Entity) SetAttribute ¶
SetAttribute - Set an attribute
type Exporter ¶
type Exporter struct{}
Exporter - exporter for entities, metrics and logs
func (*Exporter) ExportEvents ¶
ExportEvents - export events as resource logs OTEL does not distibguish between events and logs
func (*Exporter) ExportLogs ¶
ExportLogs - export resource logs
func (*Exporter) ExportMetrics ¶
ExportMetrics - export metrics
func (*Exporter) ExportSpans ¶
ExportSpans - export resource spans
type Log ¶
type Log struct {
Resource Resource `yaml:"resource,omitempty"`
Body string
Severity string // use for log
Timestamp int64 `yaml:"timestamp,omitempty"`
Attributes map[string]string
IsEvent bool `yaml:"isevent,omitempty"`
TypeName string `yaml:"typename,omitempty"`
}
Log - structs for logs“
func (*Log) SetAttribute ¶
SetAttribute - Set an attribute on log
type Metric ¶
type Metric struct {
TypeName string
ContentType string
Unit string
Type string
Resource Resource `yaml:"resource,omitempty"`
Attributes map[string]string
DataPoints []*DataPoint `yaml:"datapoints,omitempty"`
Min string `yaml:"min,omitempty"`
Max string `yaml:"max,omitempty"`
IsMonotonic bool `yaml:"ismonotonic,omitempty"`
AggregationTemporality AggregationTemporality `yaml:"aggregationtemporality,omitempty"`
}
Metric - structs for metrics
func (*Metric) AddDataPoint ¶
AddDataPoint - Add a data point
func (*Metric) ClearDataPoints ¶
func (m *Metric) ClearDataPoints()
ClearDataPoints - clears the data points
func (*Metric) SetAttribute ¶
SetAttribute - Set an attribute on metric
type Relationship ¶
Relationship - structs for holding relationship info
func NewRelationship ¶
func NewRelationship() *Relationship
NewRelationship - Returns a new Relationship
func (*Relationship) SetAttribute ¶
func (r *Relationship) SetAttribute(key, value string) *Relationship
SetAttribute - Set an attribute on log
type Span ¶
type Span struct {
TraceID string
SpanID string
TraceState string
ParentSpanID string
Name string
Kind SpanKind
StartTime int64
EndTime int64
Attributes map[string]string
Events []*SpanEvent
Links []*SpanLink
Status *SpanStatus
}
Span - structs for a span
func (*Span) SetAttribute ¶
SetAttribute - Set an attribute on log
type SpanEvent ¶
SpanEvent - event for span
func (*SpanEvent) SetAttribute ¶
SetAttribute - Set an attribute on span event
type SpanLink ¶
type SpanLink struct {
TraceID string
SpanID string
TraceState string
Attributes map[string]string
}
SpanLink - link for span
func (*SpanLink) SetAttribute ¶
SetAttribute - Set an attribute on span link
type SpanStatus ¶
type SpanStatus struct {
Message string
Code SpanStatusCode
}
SpanStatus - status for span