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 (Logs) LogRecordCount ¶
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 (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 generated protocol buffer package.
|
Package v1 is a generated protocol buffer package. |
collector/trace/v1
Package v1 is a generated protocol buffer package.
|
Package v1 is a generated protocol buffer package. |
common/v1
Package v1 is a generated protocol buffer package.
|
Package v1 is a generated protocol buffer package. |
logs/v1
Package v1 is a generated protocol buffer package.
|
Package v1 is a generated protocol buffer package. |
metrics/v1
Package v1 is a generated protocol buffer package.
|
Package v1 is a generated protocol buffer package. |
resource/v1
Package v1 is a generated protocol buffer package.
|
Package v1 is a generated protocol buffer package. |
trace/v1
Package v1 is a generated protocol buffer package.
|
Package v1 is a generated protocol buffer package. |