Documentation ¶
Index ¶
- Constants
- type AggregationTemporality
- type AnyValue
- type ArrayValue
- type Buckets
- type ExponentialHistogram
- type ExponentialHistogramDataPoint
- type ExportLogsServiceRequest
- type ExportMetricsServiceRequest
- type Gauge
- type Histogram
- type HistogramDataPoint
- type KeyValue
- type KeyValueList
- type LogRecord
- type Metric
- type NumberDataPoint
- type Resource
- type ResourceLogs
- type ResourceMetrics
- type ScopeLogs
- type ScopeMetrics
- type Sum
- type Summary
- type SummaryDataPoint
- type ValueAtQuantile
Constants ¶
const ( // AggregationTemporalityUnspecified is enum value for AggregationTemporality AggregationTemporalityUnspecified = AggregationTemporality(0) // AggregationTemporalityDelta is enum value for AggregationTemporality AggregationTemporalityDelta = AggregationTemporality(1) // AggregationTemporalityCumulative is enum value for AggregationTemporality AggregationTemporalityCumulative = AggregationTemporality(2) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregationTemporality ¶
type AggregationTemporality int
AggregationTemporality represents the corresponding OTEL protobuf enum
type AnyValue ¶
type AnyValue struct { StringValue *string BoolValue *bool IntValue *int64 DoubleValue *float64 ArrayValue *ArrayValue KeyValueList *KeyValueList BytesValue *[]byte }
AnyValue represents the corresponding OTEL protobuf message
func (*AnyValue) FormatString ¶
FormatString returns string reperesentation for av.
type ArrayValue ¶
type ArrayValue struct {
Values []*AnyValue
}
ArrayValue represents the corresponding OTEL protobuf message
type ExponentialHistogram ¶
type ExponentialHistogram struct { DataPoints []*ExponentialHistogramDataPoint AggregationTemporality AggregationTemporality }
ExponentialHistogram represents the corresponding OTEL protobuf message
type ExponentialHistogramDataPoint ¶
type ExponentialHistogramDataPoint struct { Attributes []*KeyValue TimeUnixNano uint64 Count uint64 Sum *float64 Scale int32 ZeroCount uint64 Positive *Buckets Negative *Buckets Flags uint32 Min *float64 Max *float64 ZeroThreshold float64 }
ExponentialHistogramDataPoint represents the corresponding OTEL protobuf message
type ExportLogsServiceRequest ¶ added in v1.97.8
type ExportLogsServiceRequest struct {
ResourceLogs []ResourceLogs
}
ExportLogsServiceRequest represents the corresponding OTEL protobuf message
func (*ExportLogsServiceRequest) MarshalProtobuf ¶ added in v1.97.8
func (r *ExportLogsServiceRequest) MarshalProtobuf(dst []byte) []byte
MarshalProtobuf marshals r to protobuf message, appends it to dst and returns the result.
func (*ExportLogsServiceRequest) UnmarshalProtobuf ¶ added in v1.97.8
func (r *ExportLogsServiceRequest) UnmarshalProtobuf(src []byte) (err error)
UnmarshalProtobuf unmarshals r from protobuf message at src.
type ExportMetricsServiceRequest ¶
type ExportMetricsServiceRequest struct {
ResourceMetrics []*ResourceMetrics
}
ExportMetricsServiceRequest represents the corresponding OTEL protobuf message
func (*ExportMetricsServiceRequest) MarshalProtobuf ¶ added in v1.97.0
func (r *ExportMetricsServiceRequest) MarshalProtobuf(dst []byte) []byte
MarshalProtobuf marshals r to protobuf message, appends it to dst and returns the result.
func (*ExportMetricsServiceRequest) UnmarshalProtobuf ¶ added in v1.97.0
func (r *ExportMetricsServiceRequest) UnmarshalProtobuf(src []byte) error
UnmarshalProtobuf unmarshals r from protobuf message at src.
type Gauge ¶
type Gauge struct {
DataPoints []*NumberDataPoint
}
Gauge represents the corresponding OTEL protobuf message
type Histogram ¶
type Histogram struct { DataPoints []*HistogramDataPoint AggregationTemporality AggregationTemporality }
Histogram represents the corresponding OTEL protobuf message
type HistogramDataPoint ¶
type HistogramDataPoint struct { Attributes []*KeyValue TimeUnixNano uint64 Count uint64 Sum *float64 BucketCounts []uint64 ExplicitBounds []float64 Flags uint32 }
HistogramDataPoint represents the corresponding OTEL protobuf message
type KeyValueList ¶
type KeyValueList struct {
Values []*KeyValue
}
KeyValueList represents the corresponding OTEL protobuf message
type LogRecord ¶ added in v1.97.8
type LogRecord struct { // time_unix_nano is the time when the event occurred. // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. // Value of 0 indicates unknown or missing timestamp. TimeUnixNano uint64 // Time when the event was observed by the collection system. // For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK) // this timestamp is typically set at the generation time and is equal to Timestamp. // For events originating externally and collected by OpenTelemetry (e.g. using // Collector) this is the time when OpenTelemetry's code observed the event measured // by the clock of the OpenTelemetry code. This field MUST be set once the event is // observed by OpenTelemetry. // // For converting OpenTelemetry log data to formats that support only one timestamp or // when receiving OpenTelemetry log data by recipients that support only one timestamp // internally the following logic is recommended: // - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano. // // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. // Value of 0 indicates unknown or missing timestamp. ObservedTimeUnixNano uint64 // Numerical value of the severity, normalized to values described in Log Data Model. SeverityNumber int32 SeverityText string Body AnyValue Attributes []*KeyValue }
LogRecord represents the corresponding OTEL protobuf message https://github.com/open-telemetry/oteps/blob/main/text/logs/0097-log-data-model.md
func (*LogRecord) ExtractTimestampNano ¶ added in v1.97.8
ExtractTimestampNano returns timestamp for log record
func (*LogRecord) FormatSeverity ¶ added in v1.97.8
FormatSeverity returns normalized severity for log record
type Metric ¶
type Metric struct { Name string Unit string Gauge *Gauge Sum *Sum Histogram *Histogram ExponentialHistogram *ExponentialHistogram Summary *Summary }
Metric represents the corresponding OTEL protobuf message
type NumberDataPoint ¶
type NumberDataPoint struct { Attributes []*KeyValue TimeUnixNano uint64 DoubleValue *float64 IntValue *int64 Flags uint32 }
NumberDataPoint represents the corresponding OTEL protobuf message
type Resource ¶
type Resource struct {
Attributes []*KeyValue
}
Resource represents the corresponding OTEL protobuf message
type ResourceLogs ¶ added in v1.97.8
type ResourceLogs struct { Resource Resource `json:"resource"` ScopeLogs []ScopeLogs `json:"scopeLogs"` }
ResourceLogs represents the corresponding OTEL protobuf message
type ResourceMetrics ¶
type ResourceMetrics struct { Resource *Resource ScopeMetrics []*ScopeMetrics }
ResourceMetrics represents the corresponding OTEL protobuf message
type ScopeLogs ¶ added in v1.97.8
type ScopeLogs struct {
LogRecords []LogRecord
}
ScopeLogs represents the corresponding OTEL protobuf message
type ScopeMetrics ¶
type ScopeMetrics struct {
Metrics []*Metric
}
ScopeMetrics represents the corresponding OTEL protobuf message
type Sum ¶
type Sum struct { DataPoints []*NumberDataPoint AggregationTemporality AggregationTemporality IsMonotonic bool }
Sum represents the corresponding OTEL protobuf message
type Summary ¶
type Summary struct {
DataPoints []*SummaryDataPoint
}
Summary represents the corresponding OTEL protobuf message
type SummaryDataPoint ¶
type SummaryDataPoint struct { Attributes []*KeyValue TimeUnixNano uint64 Count uint64 Sum float64 QuantileValues []*ValueAtQuantile Flags uint32 }
SummaryDataPoint represents the corresponding OTEL protobuf message
type ValueAtQuantile ¶ added in v1.97.0
ValueAtQuantile represents the corresponding OTEL protobuf message