Documentation
¶
Index ¶
Constants ¶
View Source
const ( MeasurementSpans = "spans" MeasurementSpanLinks = "span-links" MeasurementLogs = "logs" MeasurementPrometheus = "prometheus" MetricGaugeFieldKey = "gauge" MetricCounterFieldKey = "counter" MetricHistogramCountFieldKey = "count" MetricHistogramSumFieldKey = "sum" MetricHistogramMinFieldKey = "min" MetricHistogramMaxFieldKey = "max" MetricHistogramInfFieldKey = "+Inf" MetricHistogramBoundKeyV2 = "le" MetricHistogramCountSuffix = "_count" MetricHistogramSumSuffix = "_sum" MetricHistogramBucketSuffix = "_bucket" MetricHistogramMinSuffix = "_min" MetricHistogramMaxSuffix = "_max" MetricSummaryCountFieldKey = "count" MetricSummarySumFieldKey = "sum" MetricSummaryQuantileKeyV2 = "quantile" MetricSummaryCountSuffix = "_count" MetricSummarySumSuffix = "_sum" MetricExemplarSuffix = "_exemplar" // 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" AttributeObservedTimeUnixNano = "observed_time_unix_nano" // string formatted RFC3339, used by the otel statsd input plugin AttributeStartTimeStatsd = "start_time" AttributeTraceID = "trace_id" AttributeSpanID = "span_id" AttributeTraceState = "trace_state" AttributeParentSpanID = "parent_span_id" AttributeSpanName = "span.name" // https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.78.0/connector/spanmetricsconnector/connector.go#L30 AttributeSpanKind = "span.kind" // https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.78.0/connector/spanmetricsconnector/connector.go#L31 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" AttributeFlags = "flags" )
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 ¶
This section is empty.
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.