Skip to content

Commit

Permalink
Move Metrics API behind internal package (#2651)
Browse files Browse the repository at this point in the history
* Move __init__.py file

* Move Metrics API behind internal package
  • Loading branch information
aabmass authored Apr 29, 2022
1 parent a4b4c45 commit 2972ebc
Show file tree
Hide file tree
Showing 24 changed files with 888 additions and 825 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
# Otherwise, set variable to the commit of your branch on
# opentelemetry-python-contrib which is compatible with these Core repo
# changes.
CONTRIB_REPO_SHA: 4cfca481f8e2c8af5f7cfd032997fac692995f67
CONTRIB_REPO_SHA: 008cd2370dcd3e87cca8c0ddbb0b820681fd7346
# This is needed because we do not clone the core repo in contrib builds anymore.
# When running contrib builds as part of core builds, we use actions/checkout@v2 which
# does not set an environment variable (simply just runs tox), which is different when
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.11.1-0.30b1...HEAD)

## [1.11.1-0.30b1](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.11.1-0.30b1) - 2022-04-21
- Move Metrics API behind internal package
([#2651](https://github.com/open-telemetry/opentelemetry-python/pull/2651))

## [1.11.1-0.30b1](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.11.1-0.30b1) - 2022-04-21

- Add parameter to MetricReader constructor to select aggregation per instrument kind
([#2638](https://github.com/open-telemetry/opentelemetry-python/pull/2638))
Expand Down
8 changes: 0 additions & 8 deletions docs/api/metrics.instrument.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/api/metrics.observation.rst

This file was deleted.

5 changes: 0 additions & 5 deletions docs/api/metrics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@ opentelemetry._metrics package

Once metrics become stable, this package will be be renamed to ``opentelemetry.metrics``.

Submodules
----------

.. toctree::

metrics.instrument
metrics.observation

Module contents
---------------
Expand Down
22 changes: 1 addition & 21 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@
# https://github.com/sphinx-doc/sphinx/pull/3744
nitpick_ignore = [
("py:class", "ValueT"),
("py:class", "MetricT"),
("py:class", "InstrumentT"),
("py:obj", "opentelemetry._metrics.instrument.InstrumentT"),
# Even if wrapt is added to intersphinx_mapping, sphinx keeps failing
# with "class reference target not found: ObjectProxy".
("py:class", "ObjectProxy"),
Expand Down Expand Up @@ -142,24 +139,7 @@
"examples/error_handler/error_handler_1",
]

_exclude_members = [
"_ProxyObservableUpDownCounter",
"_ProxyHistogram",
"_ProxyObservableGauge",
"_ProxyInstrument",
"_ProxyAsynchronousInstrument",
"_ProxyCounter",
"_ProxyUpDownCounter",
"_ProxyObservableCounter",
"_ProxyObservableGauge",
"_abc_impl",
"_Adding",
"_Grouping",
"_Monotonic",
"_NonMonotonic",
"Synchronous",
"Asynchronous",
]
_exclude_members = ["_abc_impl"]

autodoc_default_options = {
"members": True,
Expand Down
7 changes: 5 additions & 2 deletions docs/examples/metrics/example.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from typing import Iterable

from opentelemetry._metrics import get_meter_provider, set_meter_provider
from opentelemetry._metrics.observation import Observation
from opentelemetry._metrics import (
Observation,
get_meter_provider,
set_meter_provider,
)
from opentelemetry.exporter.otlp.proto.grpc._metric_exporter import (
OTLPMetricExporter,
)
Expand Down
7 changes: 5 additions & 2 deletions docs/getting_started/metrics_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@

from typing import Iterable

from opentelemetry._metrics import get_meter_provider, set_meter_provider
from opentelemetry._metrics.observation import Observation
from opentelemetry._metrics import (
Observation,
get_meter_provider,
set_meter_provider,
)
from opentelemetry.sdk._metrics import MeterProvider
from opentelemetry.sdk._metrics.export import (
ConsoleMetricExporter,
Expand Down
Loading

0 comments on commit 2972ebc

Please sign in to comment.