Documentation ¶
Index ¶
- Variables
- func DoubleDataPoint(labels []*otlpcommon.StringKeyValue, start, end time.Time, value float64) *otlpmetrics.DoubleDataPoint
- func DoubleGauge(name, desc, unit string, ddps ...*otlpmetrics.DoubleDataPoint) *otlpmetrics.Metric
- func DoubleHistogramCumulative(name, desc, unit string, idps ...*otlpmetrics.DoubleHistogramDataPoint) *otlpmetrics.Metric
- func DoubleHistogramDataPoint(labels []*otlpcommon.StringKeyValue, start, end time.Time, sum float64, ...) *otlpmetrics.DoubleHistogramDataPoint
- func DoubleSumCumulative(name, desc, unit string, ddps ...*otlpmetrics.DoubleDataPoint) *otlpmetrics.Metric
- func DoubleSumCumulativeMonotonic(name, desc, unit string, ddps ...*otlpmetrics.DoubleDataPoint) *otlpmetrics.Metric
- func DoubleSummary(name, desc, unit string, dps ...*otlpmetrics.DoubleSummaryDataPoint) *otlpmetrics.Metric
- func DoubleSummaryDataPoint(labels []*otlpcommon.StringKeyValue, start, end time.Time, sum float64, ...) *otlpmetrics.DoubleSummaryDataPoint
- func ExportRequest(rms ...*otlpmetrics.ResourceMetrics) *otlppb.ExportMetricsServiceRequest
- func InstrumentationLibrary(name, version string) *otlpcommon.InstrumentationLibrary
- func InstrumentationLibraryMetrics(lib *otlpcommon.InstrumentationLibrary, ms ...*otlpmetrics.Metric) *otlpmetrics.InstrumentationLibraryMetrics
- func IntDataPoint(labels []*otlpcommon.StringKeyValue, start, end time.Time, value int64) *otlpmetrics.IntDataPoint
- func IntGauge(name, desc, unit string, idps ...*otlpmetrics.IntDataPoint) *otlpmetrics.Metric
- func IntSumCumulative(name, desc, unit string, idps ...*otlpmetrics.IntDataPoint) *otlpmetrics.Metric
- func IntSumCumulativeMonotonic(name, desc, unit string, idps ...*otlpmetrics.IntDataPoint) *otlpmetrics.Metric
- func KeyValue(k, v string) *otlpcommon.KeyValue
- func Label(key, value string) *otlpcommon.StringKeyValue
- func Labels(kvs ...*otlpcommon.StringKeyValue) []*otlpcommon.StringKeyValue
- func Resource(kvs ...*otlpcommon.KeyValue) *otlpresource.Resource
- func ResourceLabels(kvs ...*otlpcommon.KeyValue) []*otlpcommon.KeyValue
- func ResourceMetrics(resource *otlpresource.Resource, ...) *otlpmetrics.ResourceMetrics
- type DoubleHistogramBucketStruct
- type DoubleSummaryQuantileValueStruct
- type Visitor
- type VisitorState
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyMetricName = fmt.Errorf("empty metric name") ErrInvalidPointKind = fmt.Errorf("unrecognized data point type") )
Functions ¶
func DoubleDataPoint ¶
func DoubleDataPoint(labels []*otlpcommon.StringKeyValue, start, end time.Time, value float64) *otlpmetrics.DoubleDataPoint
func DoubleGauge ¶
func DoubleGauge(name, desc, unit string, ddps ...*otlpmetrics.DoubleDataPoint) *otlpmetrics.Metric
func DoubleHistogramCumulative ¶
func DoubleHistogramCumulative(name, desc, unit string, idps ...*otlpmetrics.DoubleHistogramDataPoint) *otlpmetrics.Metric
func DoubleHistogramDataPoint ¶
func DoubleHistogramDataPoint(labels []*otlpcommon.StringKeyValue, start, end time.Time, sum float64, total uint64, buckets ...DoubleHistogramBucketStruct) *otlpmetrics.DoubleHistogramDataPoint
func DoubleSumCumulative ¶
func DoubleSumCumulative(name, desc, unit string, ddps ...*otlpmetrics.DoubleDataPoint) *otlpmetrics.Metric
func DoubleSumCumulativeMonotonic ¶
func DoubleSumCumulativeMonotonic(name, desc, unit string, ddps ...*otlpmetrics.DoubleDataPoint) *otlpmetrics.Metric
func DoubleSummary ¶ added in v0.23.0
func DoubleSummary(name, desc, unit string, dps ...*otlpmetrics.DoubleSummaryDataPoint) *otlpmetrics.Metric
func DoubleSummaryDataPoint ¶ added in v0.23.0
func DoubleSummaryDataPoint(labels []*otlpcommon.StringKeyValue, start, end time.Time, sum float64, count uint64, quantiles ...DoubleSummaryQuantileValueStruct) *otlpmetrics.DoubleSummaryDataPoint
func ExportRequest ¶
func ExportRequest(rms ...*otlpmetrics.ResourceMetrics) *otlppb.ExportMetricsServiceRequest
func InstrumentationLibrary ¶
func InstrumentationLibrary(name, version string) *otlpcommon.InstrumentationLibrary
func InstrumentationLibraryMetrics ¶
func InstrumentationLibraryMetrics(lib *otlpcommon.InstrumentationLibrary, ms ...*otlpmetrics.Metric) *otlpmetrics.InstrumentationLibraryMetrics
func IntDataPoint ¶
func IntDataPoint(labels []*otlpcommon.StringKeyValue, start, end time.Time, value int64) *otlpmetrics.IntDataPoint
func IntGauge ¶
func IntGauge(name, desc, unit string, idps ...*otlpmetrics.IntDataPoint) *otlpmetrics.Metric
func IntSumCumulative ¶
func IntSumCumulative(name, desc, unit string, idps ...*otlpmetrics.IntDataPoint) *otlpmetrics.Metric
func IntSumCumulativeMonotonic ¶
func IntSumCumulativeMonotonic(name, desc, unit string, idps ...*otlpmetrics.IntDataPoint) *otlpmetrics.Metric
func KeyValue ¶
func KeyValue(k, v string) *otlpcommon.KeyValue
func Label ¶
func Label(key, value string) *otlpcommon.StringKeyValue
func Labels ¶
func Labels(kvs ...*otlpcommon.StringKeyValue) []*otlpcommon.StringKeyValue
func Resource ¶
func Resource(kvs ...*otlpcommon.KeyValue) *otlpresource.Resource
func ResourceLabels ¶
func ResourceLabels(kvs ...*otlpcommon.KeyValue) []*otlpcommon.KeyValue
func ResourceMetrics ¶
func ResourceMetrics(resource *otlpresource.Resource, ilms ...*otlpmetrics.InstrumentationLibraryMetrics) *otlpmetrics.ResourceMetrics
Types ¶
type DoubleHistogramBucketStruct ¶
func DoubleHistogramBucket ¶
func DoubleHistogramBucket(boundary float64, count uint64) DoubleHistogramBucketStruct
type DoubleSummaryQuantileValueStruct ¶ added in v0.23.0
func DoubleSummaryQuantileValue ¶ added in v0.23.0
func DoubleSummaryQuantileValue(quantile, value float64) DoubleSummaryQuantileValueStruct
type Visitor ¶
type Visitor func( resource *otlpresource.Resource, metricName string, kind config.Kind, monotonic bool, point interface{}, ) error
Visitor is used because it takes around 50 lines of code to traverse an OTLP request, with looping over Resource, Instrumentation Library, the list of Metrics, and six distinct types of data point.
type VisitorState ¶
type VisitorState struct {
// contains filtered or unexported fields
}
func (*VisitorState) InvalidCount ¶
func (vs *VisitorState) InvalidCount() int
func (*VisitorState) PointCount ¶
func (vs *VisitorState) PointCount() int
func (*VisitorState) Visit ¶
func (vs *VisitorState) Visit( ctx context.Context, visitor Visitor, metrics ...*otlpmetrics.ResourceMetrics, ) error
Click to show internal directories.
Click to hide internal directories.