data

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Copyright 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

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogsToProto

func LogsToProto(ld Logs) []*logsproto.ResourceLogs

LogsToProto converts the internal Logs to the ProtoBuf.

func MetricDataToOtlp

func MetricDataToOtlp(md MetricData) []*otlpmetrics.ResourceMetrics

MetricDataToOtlp converts the internal MetricData to the OTLP.

Types

type Logs

type Logs struct {
	// contains filtered or unexported fields
}

Logs is the top-level struct that is propagated through the logs pipeline.

This is a reference type (like builtin map).

Must use NewLogs functions to create new instances. Important: zero-initialized instance is not valid for use.

func LogsFromProto

func LogsFromProto(orig []*logsproto.ResourceLogs) Logs

LogsFromProto creates the internal Logs representation from the ProtoBuf.

func NewLogs

func NewLogs() Logs

NewLogs creates a new Logs.

func (Logs) Clone

func (ld Logs) Clone() Logs

Clone returns a copy of Logs.

func (Logs) LogRecordCount

func (ld Logs) LogRecordCount() int

LogRecordCount calculates the total number of log records.

func (Logs) ResourceLogs

func (ld Logs) ResourceLogs() pdata.ResourceLogsSlice

type MetricData

type MetricData struct {
	// contains filtered or unexported fields
}

MetricData is the top-level struct that is propagated through the metrics pipeline. This is the newer version of consumerdata.MetricsData, but uses more efficient in-memory representation.

This is a reference type (like builtin map).

Must use NewMetricData functions to create new instances. Important: zero-initialized instance is not valid for use.

func MetricDataFromOtlp

func MetricDataFromOtlp(orig []*otlpmetrics.ResourceMetrics) MetricData

MetricDataFromOtlp creates the internal MetricData representation from the OTLP.

func NewMetricData

func NewMetricData() MetricData

NewMetricData creates a new MetricData.

func (MetricData) Clone

func (md MetricData) Clone() MetricData

Clone returns a copy of MetricData.

func (MetricData) MetricAndDataPointCount

func (md MetricData) MetricAndDataPointCount() (metricCount int, dataPointCount int)

MetricAndDataPointCount calculates the total number of metrics and data points.

func (MetricData) MetricCount

func (md MetricData) MetricCount() int

MetricCount calculates the total number of metrics.

func (MetricData) ResourceMetrics

func (md MetricData) ResourceMetrics() pdata.ResourceMetricsSlice

Directories

Path Synopsis
opentelemetry-proto-gen
collector/metrics/v1
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.
collector/trace/v1
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.

Jump to

Keyboard shortcuts

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