Documentation ¶
Overview ¶
Copyright 2024 The Prometheus 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 ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OtelMetricsToMetadata ¶
func OtelMetricsToMetadata(md pmetric.Metrics, addMetricSuffixes bool) []*mimirpb.MetricMetadata
Types ¶
type ByLabelName ¶
type ByLabelName []mimirpb.LabelAdapter
ByLabelName enables the usage of sort.Sort() with a slice of labels.
func (ByLabelName) Len ¶
func (a ByLabelName) Len() int
func (ByLabelName) Less ¶
func (a ByLabelName) Less(i, j int) bool
func (ByLabelName) Swap ¶
func (a ByLabelName) Swap(i, j int)
type MimirConverter ¶
type MimirConverter struct {
// contains filtered or unexported fields
}
MimirConverter converts from OTel write format to Mimir remote write format.
func NewMimirConverter ¶
func NewMimirConverter() *MimirConverter
func (*MimirConverter) FromMetrics ¶
func (c *MimirConverter) FromMetrics(ctx context.Context, md pmetric.Metrics, settings Settings, logger *slog.Logger) (annots annotations.Annotations, errs error)
FromMetrics converts pmetric.Metrics to Mimir remote write format.
func (*MimirConverter) TimeSeries ¶
func (c *MimirConverter) TimeSeries() []mimirpb.PreallocTimeseries
TimeSeries returns a slice of the mimirpb.TimeSeries that were converted from OTel format.
type StartTsAndTs ¶
type StartTsAndTs struct { Labels []mimirpb.LabelAdapter StartTs int64 Ts int64 }