diff --git a/opentelemetry-api/src/opentelemetry/metrics/__init__.py b/opentelemetry-api/src/opentelemetry/metrics/__init__.py new file mode 100644 index 00000000000..bb577d034f2 --- /dev/null +++ b/opentelemetry-api/src/opentelemetry/metrics/__init__.py @@ -0,0 +1,80 @@ +# Copyright The 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. + + +class Measurement: + pass + + +class Instrument: + pass + + +class Synchronous(Instrument): + pass + + +class Asynchronous(Instrument): + pass + + +class Adding(Instrument): + pass + + +class Grouping(Instrument): + pass + + +class Monotonic(Adding): + pass + + +class NonMonotonic(Adding): + pass + + +class Counter(Monotonic, Synchronous): + pass + + +class UpDownCounter(NonMonotonic, Synchronous): + pass + + +class AsynchronousCounter(Monotonic, Asynchronous): + pass + + +class AsynchronousUpDownCounter(NonMonotonic, Asynchronous): + pass + + +class Histogram(Synchronous, Grouping): + pass + + +class AsynchronousGauge(Asynchronous, Grouping): + pass + + +class Meter: + def create_counter(self): + pass + + +class MeterProvider: + + def provide(self, name, version=None): + return Meter()