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 string, value interface{}) *Entity
- type Exporter
- type FsocData
- type Log
- type Metric
- func (m *Metric) AddDataPoint(startTime, endTime int64, attributes map[string]interface{}, value float64) *Metric
- func (m *Metric) AddDistributionDataPoint(startTime, endTime int64, value float64, count int64, ...) *Metric
- func (m *Metric) AddHistogramDataPoint(startTime, endTime int64, value float64, count int64, quantile string, ...) *Metric
- func (m *Metric) ClearDataPoints()
- func (m *Metric) SetAttribute(key string, value interface{}) *Metric
- type QuantileValue
- type Relationship
- type Resource
- type Span
- type SpanEvent
- type SpanKind
- type SpanLink
- type SpanStatus
- type SpanStatusCode
Constants ¶
const ( DumpFormatHuman = "human" DumpFormatText = "text" DumpFormatJson = "json" DumpFormatYaml = "yaml" DumpFormatHex = "hex" )
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
func (*AggregationTemporality) UnmarshalYAML ¶ added in v0.63.1
func (a *AggregationTemporality) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML for AggregationTemporality support both integer and string (human) enumerated values
type DataPoint ¶
type DataPoint struct { StartTime int64 EndTime int64 Value float64 Count int64 Bucket_Count []uint64 `yaml:"bucket_count,omitempty"` Explicit_Bounds []float64 `yaml:"explicit_bounds,omitempty"` Attributes map[string]interface{} `yaml:"attributes,omitempty"` Quantiles []*QuantileValue }
DataPoint - structs for data point
type Entity ¶
type Entity struct { TypeName string ID string `yaml:"id,omitempty"` Attributes map[string]interface{} 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 ¶
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]interface{} 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 Description string ContentType string Unit string Type string Resource Resource `yaml:"resource,omitempty"` Attributes map[string]interface{} `yaml:"attributes,omitempty"` DataPoints []*DataPoint `yaml:"datapoints,omitempty"` Min string `yaml:"min,omitempty"` Max string `yaml:"max,omitempty"` Value string `yaml:"value,omitempty"` IsMonotonic bool `yaml:"ismonotonic,omitempty"` AggregationTemporality AggregationTemporality `yaml:"aggregationtemporality,omitempty"` }
Metric - structs for metrics
func (*Metric) AddDataPoint ¶
func (m *Metric) AddDataPoint(startTime, endTime int64, attributes map[string]interface{}, value float64) *Metric
AddDataPoint - Add a data point for sum or gauge metrics
func (*Metric) AddDistributionDataPoint ¶ added in v0.65.0
func (m *Metric) AddDistributionDataPoint(startTime, endTime int64, value float64, count int64, quantiles []*QuantileValue) *Metric
AddDistributionDataPoint - Add a data point for distribution metrics.
func (*Metric) AddHistogramDataPoint ¶ added in v0.69.0
func (m *Metric) AddHistogramDataPoint(startTime, endTime int64, value float64, count int64, quantile string, bucket_count []uint64, explicit_bounds []float64) *Metric
AddHistogramDataPoint - Add a data point for histrogram metrics.
func (*Metric) ClearDataPoints ¶
func (m *Metric) ClearDataPoints()
ClearDataPoints - clears the data points
func (*Metric) SetAttribute ¶
SetAttribute - Set an attribute on metric
type QuantileValue ¶ added in v0.65.0
type Relationship ¶
type Relationship struct {
Attributes map[string]interface{}
}
Relationship - structs for holding relationship info
func NewRelationship ¶
func NewRelationship() *Relationship
NewRelationship - Returns a new Relationship
func (*Relationship) SetAttribute ¶
func (r *Relationship) SetAttribute(key string, value interface{}) *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]interface{} 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]interface{} }
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