metrics

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Copyright (C) 2019-2023 vdaas.org vald team <vald@vdaas.org>

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

https://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

View Source
const (
	// Dimensionless is a type alias of unit.Dimensionless.
	Dimensionless = unit.Dimensionless
	// Bytes is a type alias of unit.Bytes.
	Bytes = unit.Bytes
	// Milliseconds is a type alias of unit.Milliseconds.
	Milliseconds = unit.Milliseconds
)

Units defined by OpenTelemetry.

View Source
const ValdOrg = "vald.vdaas.org"

Variables

View Source
var (
	RoughMillisecondsDistribution = []float64{
		1,
		5,
		10,
		30,
		60,
		8,
		100,
		200,
		300,
		400,
		500,
		600,
		800,
		1000,
		1300,
		1600,
		2000,
		2500,
		3000,
		4000,
		5000,
		6500,
		8000,
		10000,
		13000,
		16000,
		20000,
		25000,
		30000,
		40000,
		50000,
		65000,
		80000,
		100000,
		200000,
		500000,
		1000000,
		2000000,
		5000000,
		10000000,
	}

	DefaultMillisecondsDistribution = []float64{
		0.01,
		0.05,
		0.1,
		0.3,
		0.6,
		0.8,
		1,
		2,
		3,
		4,
		5,
		6,
		8,
		10,
		13,
		16,
		20,
		25,
		30,
		40,
		50,
		65,
		80,
		100,
		130,
		160,
		200,
		250,
		300,
		400,
		500,
		650,
		800,
		1000,
		2000,
		5000,
		10000,
		20000,
		50000,
		100000,
	}
)

Functions

func WithDescription added in v1.6.0

func WithDescription(desc string) instrument.Option

WithDescription returns an instrument.WithDescription option.

func WithUnit added in v1.6.0

func WithUnit(u Unit) instrument.Option

WithUnit returns an instrument.WithUnit option.

Types

type AsynchronousInstrument added in v1.6.0

type AsynchronousInstrument = instrument.Asynchronous

AsynchronousInstrument is type alias of instrument.Asynchronous.

type Meter added in v1.6.0

type Meter = metric.Meter

Meter is type alias of metrics.Meter.

func GetMeter added in v1.6.0

func GetMeter() Meter

GetMeter returns the Meter object to record metrics.

type Metric

type Metric interface {
	Viewer
	Register(Meter) error
}

Metric represents an interface for metric.

type SynchronousInstrument added in v1.6.0

type SynchronousInstrument = instrument.Synchronous

SynchronousInstrument is type alias of instrument.Synchronous.

type Unit added in v1.6.0

type Unit = unit.Unit

Unit is type alias of unit.Unit.

type View

type View = view.View

type Viewer added in v1.6.0

type Viewer interface {
	View() ([]*View, error)
}

Directories

Path Synopsis
agent
manager
mem
runtime
cgo

Jump to

Keyboard shortcuts

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