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 ¶
- func LogsToProto(ld Logs) []*otlplogs.ResourceLogs
- func MetricDataToOtlp(md MetricData) []*otlpmetrics.ResourceMetrics
- func NewBoolValue(b bool) *commonproto.AnyValue
- func NewDoubleValue(d float64) *commonproto.AnyValue
- func NewIntValue(i int64) *commonproto.AnyValue
- func NewStringValue(s string) *commonproto.AnyValue
- type Logs
- type MetricData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogsToProto ¶
func LogsToProto(ld Logs) []*otlplogs.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.
func NewBoolValue ¶ added in v0.7.0
func NewBoolValue(b bool) *commonproto.AnyValue
func NewDoubleValue ¶ added in v0.7.0
func NewDoubleValue(d float64) *commonproto.AnyValue
func NewIntValue ¶ added in v0.7.0
func NewIntValue(i int64) *commonproto.AnyValue
func NewStringValue ¶ added in v0.7.0
func NewStringValue(s string) *commonproto.AnyValue
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 []*otlplogs.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
func (MetricData) Size ¶ added in v0.7.0
func (md MetricData) Size() int
Size returns size in bytes.
Directories ¶
Path | Synopsis |
---|---|
opentelemetry-proto-gen
|
|
collector/logs/v1
Package v1 is a reverse proxy.
|
Package v1 is a reverse proxy. |
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. |