otlp

package
v0.0.0-...-c5ef21f Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
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.

View Source
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

func ComposeBucketFieldName(lower, upper float64, isPositive bool) string

ComposeBucketFieldName generates the bucket count field name for histogram metrics.

func ComputeBucketBoundary

func ComputeBucketBoundary(fieldName string, isPositive bool) (float64, error)

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 IsInternalField(fieldname string) bool

func IsInternalTag

func IsInternalTag(tagname string) bool

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.

Jump to

Keyboard shortcuts

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