blob: 48a59c5b82af35861f3c8d965e436332c06f2584 [file] [log] [blame]
Joey Armstronge8c091f2023-01-17 16:56:26 -05001// Copyright The OpenTelemetry Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Package metric provides support for reporting measurements using instruments.
16//
17// Instruments are categorized as below:
18//
19// Synchronous instruments are called by the user with a Context.
20// Asynchronous instruments are called by the SDK during collection.
21//
22// Additive instruments are semantically intended for capturing a sum.
23// Non-additive instruments are intended for capturing a distribution.
24//
25// Additive instruments may be monotonic, in which case they are
26// non-descreasing and naturally define a rate.
27//
28// The synchronous instrument names are:
29//
30// Counter: additive, monotonic
31// UpDownCounter: additive
32// ValueRecorder: non-additive
33//
34// and the asynchronous instruments are:
35//
36// SumObserver: additive, monotonic
37// UpDownSumObserver: additive
38// ValueObserver: non-additive
39//
40// All instruments are provided with support for either float64 or
41// int64 input values.
42//
43// The Meter interface supports allocating new instruments as well as
44// interfaces for recording batches of synchronous measurements or
45// asynchronous observations. To obtain a Meter, use a MeterProvider.
46//
47// The MeterProvider interface supports obtaining a named Meter interface. To
48// obtain a MeterProvider implementation, initialize and configure any
49// compatible SDK.
50package metric // import "go.opentelemetry.io/otel/api/metric"