Documentation ¶
Index ¶
- Constants
- func ComposeBucketFieldName(lower, upper float64, isPositive bool) string
- func ComputeBucketBoundary(fieldName string, isPositive bool) (float64, error)
- func ComputeBuckets(multiValues models.MetricFloatValues, isPositive bool) (bucketBounds []float64, bucketCounts []float64)
- func IsInternalField(fieldname string) bool
- func IsInternalTag(tagname string) bool
- func ReverseSlice[T comparable](s []T)
- func SeverityTextToSeverityNumber(severityText string) plog.SeverityNumber
Constants ¶
const ( TagKeyScopeName = "otlp.scope.name" TagKeyScopeVersion = "otlp.scope.version" TagKeyScopeDroppedAttributesCount = "otlp.scope.dropped.attributes.count" TagKeyMetricIsMonotonic = "otlp.metric.ismonotonic" TagKeyMetricAggregationTemporality = "otlp.metric.aggregation.temporality" TagKeyMetricHistogramType = "otlp.metric.histogram.type" TagKeySpanStatusMessage = "otlp.span.status.message" TagKeySpanDroppedEventsCount = "otlp.span.dropped.events.count" TagKeySpanDroppedLinksCount = "otlp.span.dropped.links.count" TagKeySpanDroppedAttrsCount = "otlp.span.dropped.attributes.count" TagKeyLogFlag = "otlp.log.flag" )
internal event tag keys of otlp logs/metrics/traces. don't forget to update IsInternalTag when adding new tag keys.
const ( FieldCount = "count" FieldSum = "sum" FieldMin = "min" FieldMax = "max" FieldScale = "scale" FieldPositiveOffset = "positive.offset" FieldNegativeOffset = "negative.offset" FieldZeroCount = "zero.count" )
internal field names of otlp metrics. don't forget to update IsInternalField when adding new tag keys.
Variables ¶
This section is empty.
Functions ¶
func ComposeBucketFieldName ¶
ComposeBucketFieldName generates the bucket count field name for histogram metrics.
func ComputeBucketBoundary ¶
ComputeBucketBoundary computes the bucket boundary from a field name.
func ComputeBuckets ¶
func ComputeBuckets(multiValues models.MetricFloatValues, isPositive bool) (bucketBounds []float64, bucketCounts []float64)
ComputeBuckets computes the bucket boundarys and counts.
func IsInternalField ¶
func IsInternalTag ¶
When count is less than 20, direct comparison faster than map.
func ReverseSlice ¶
func ReverseSlice[T comparable](s []T)
func SeverityTextToSeverityNumber ¶
func SeverityTextToSeverityNumber(severityText string) plog.SeverityNumber
SeverityTextToSeverityNumber can convert a provided serverityText into its corresponding serverity number. It is case-insensitive and can accept the following serverityText values: Trace, Trace2, Trace3, Trace4, Debug, Debug2, Debug3, Debug4, Info, Info2, Info3, Info4, Information, Information2, Information3, Information4, Warn, Warn2, Warn3, Warn4, Warning, Warning2, Warning3, Warning4, Error, Error2, Error3, Error4, Fatal, Fatal2, Fatal3, Fatal4, and Unspecified. If the provided serverityText is not in this list, the function will return Unspecified by default.
Types ¶
This section is empty.