Documentation ¶
Overview ¶
Package internal is a near copy of https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.61.0/receiver/prometheusreceiver/internal A copy was made because the upstream package is internal. If it is ever made public, our copy can be removed.
Copyright The OpenTelemetry Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func CreateResource(job, instance string, serviceDiscoveryLabels labels.Labels) pcommon.Resource
- func NewAppendable(sink consumer.Metrics, set receiver.CreateSettings, gcInterval time.Duration, ...) (storage.Appendable, error)
- func NewZapToGokitLogAdapter(logger *zap.Logger) gokitLog.Logger
- type JobsMap
- type MetricsAdjuster
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateResource ¶
CreateResource creates the resource data added to OTLP payloads.
func NewAppendable ¶
func NewAppendable( sink consumer.Metrics, set receiver.CreateSettings, gcInterval time.Duration, useStartTimeMetric bool, startTimeMetricRegex *regexp.Regexp, receiverID component.ID, externalLabels labels.Labels) (storage.Appendable, error)
NewAppendable returns a storage.Appendable instance that emits metrics to the sink.
Types ¶
type JobsMap ¶
JobsMap maps from a job instance to a map of timeseries instances for the job.
func NewJobsMap ¶
NewJobsMap creates a new (empty) JobsMap.
type MetricsAdjuster ¶
MetricsAdjuster adjusts the start time of metrics when converting between Prometheus and OTel.
func NewInitialPointAdjuster ¶
func NewInitialPointAdjuster(logger *zap.Logger, gcInterval time.Duration) MetricsAdjuster
NewInitialPointAdjuster returns a new MetricsAdjuster that adjust metrics' start times based on the initial received points.
func NewStartTimeMetricAdjuster ¶
func NewStartTimeMetricAdjuster(logger *zap.Logger, startTimeMetricRegex *regexp.Regexp) MetricsAdjuster
NewStartTimeMetricAdjuster returns a new MetricsAdjuster that adjust metrics' start times based on a start time metric.