Documentation ¶
Overview ¶
Package common is temporarily copied from github.com/influxdata/influxdb-observability/common to unblock the collector release. Once https://github.com/influxdata/influxdb-observability/pull/182 is merged, this package can be removed.
Index ¶
Constants ¶
View Source
const ( MeasurementSpans = "spans" MeasurementSpanLinks = "span-links" MeasurementLogs = "logs" MeasurementPrometheus = "prometheus" MetricGaugeFieldKey = "gauge" MetricCounterFieldKey = "counter" MetricHistogramCountFieldKey = "count" MetricHistogramSumFieldKey = "sum" MetricHistogramInfFieldKey = "inf" MetricHistogramBoundKeyV2 = "le" MetricHistogramCountSuffix = "_count" MetricHistogramSumSuffix = "_sum" MetricHistogramBucketSuffix = "_bucket" MetricSummaryCountFieldKey = "count" MetricSummarySumFieldKey = "sum" MetricSummaryQuantileKeyV2 = "quantile" MetricSummaryCountSuffix = "_count" MetricSummarySumSuffix = "_sum" // These attribute key names are influenced by the proto message keys. // https://github.com/open-telemetry/opentelemetry-proto/blob/abbf7b7b49a5342d0d6c0e86e91d713bbedb6580/opentelemetry/proto/trace/v1/trace.proto // https://github.com/open-telemetry/opentelemetry-proto/blob/abbf7b7b49a5342d0d6c0e86e91d713bbedb6580/opentelemetry/proto/metrics/v1/metrics.proto // https://github.com/open-telemetry/opentelemetry-proto/blob/abbf7b7b49a5342d0d6c0e86e91d713bbedb6580/opentelemetry/proto/logs/v1/logs.proto AttributeTime = "time" AttributeStartTimeUnixNano = "start_time_unix_nano" AttributeTraceID = "trace_id" AttributeSpanID = "span_id" AttributeTraceState = "trace_state" AttributeParentSpanID = "parent_span_id" AttributeParentServiceName = "parent_service_name" AttributeChildServiceName = "child_service_name" AttributeCallCount = "call_count" AttributeSpansQueueDepth = "spans_queue_depth" AttributeSpansDropped = "spans_dropped" AttributeName = "name" AttributeSpanKind = "kind" AttributeEndTimeUnixNano = "end_time_unix_nano" AttributeDurationNano = "duration_nano" AttributeDroppedAttributesCount = "dropped_attributes_count" AttributeDroppedEventsCount = "dropped_events_count" AttributeDroppedLinksCount = "dropped_links_count" AttributeAttributes = "attributes" AttributeLinkedTraceID = "linked_trace_id" AttributeLinkedSpanID = "linked_span_id" AttributeSeverityNumber = "severity_number" AttributeSeverityText = "severity_text" AttributeBody = "body" )
Variables ¶
View Source
var MetricsSchemata = map[string]MetricsSchema{ MetricsSchemaTelegrafPrometheusV1.String(): MetricsSchemaTelegrafPrometheusV1, MetricsSchemaTelegrafPrometheusV2.String(): MetricsSchemaTelegrafPrometheusV2, MetricsSchemaOtelV1.String(): MetricsSchemaOtelV1, }
View Source
var ResourceNamespace = regexp.MustCompile(generateResourceNamespaceRegexp())
Functions ¶
Types ¶
type ErrorLogger ¶
type ErrorLogger struct {
Logger
}
ErrorLogger intercepts log entries emitted by this package, adding key "error" before any error type value.
ErrorLogger panicks if the resulting kv slice length is odd.
func (*ErrorLogger) Debug ¶
func (e *ErrorLogger) Debug(msg string, kv ...interface{})
type InfluxMetricValueType ¶
type InfluxMetricValueType uint8
const ( InfluxMetricValueTypeUntyped InfluxMetricValueType = iota InfluxMetricValueTypeGauge InfluxMetricValueTypeSum InfluxMetricValueTypeHistogram InfluxMetricValueTypeSummary )
func (InfluxMetricValueType) String ¶
func (vType InfluxMetricValueType) String() string
type Logger ¶
type Logger interface {
Debug(msg string, kv ...interface{})
}
Logger must be implemented by the user of this package. Emitted logs indicate non-fatal conversion errors.
type MetricsSchema ¶
type MetricsSchema uint8
const ( MetricsSchemaTelegrafPrometheusV1 MetricsSchema MetricsSchemaTelegrafPrometheusV2 MetricsSchemaOtelV1 )
func (MetricsSchema) String ¶
func (ms MetricsSchema) String() string
type NoopLogger ¶
type NoopLogger struct{}
NoopLogger is a no-op implementation of Logger.
func (NoopLogger) Debug ¶
func (NoopLogger) Debug(_ string, _ ...interface{})
type RetryableError ¶
type RetryableError struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.