Skip to content

Commit

Permalink
Merge branch 'main' into issue_2656
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanthccv authored May 23, 2022
2 parents 362fa9a + 54e2fef commit a34d813
Show file tree
Hide file tree
Showing 91 changed files with 352 additions and 324 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: 008cd2370dcd3e87cca8c0ddbb0b820681fd7346
CONTRIB_REPO_SHA: 7b42e4354dc3244ef2878bfd0d7d4c80d25cba0a
# 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
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

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

## [1.12.0rc1-0.31b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.12.0rc1-0.31b0) - 2022-05-17



- Fix LoggingHandler to handle LogRecord with exc_info=False
([#2690](https://github.com/open-telemetry/opentelemetry-python/pull/2690))
- Make metrics components public
([#2684](https://github.com/open-telemetry/opentelemetry-python/pull/2684))
- Update to semantic conventions v1.11.0
([#2669](https://github.com/open-telemetry/opentelemetry-python/pull/2669))
- Update opentelemetry-proto to v0.17.0
Expand Down
13 changes: 3 additions & 10 deletions docs/api/metrics.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
opentelemetry._metrics package
==============================

.. warning::
OpenTelemetry Python metrics are in an experimental state. The APIs within
:mod:`opentelemetry._metrics` are subject to change in minor/patch releases and make no
backward compatability guarantees at this time.

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

.. toctree::


Module contents
---------------

.. automodule:: opentelemetry._metrics
.. automodule:: opentelemetry.metrics
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@
("py:class", "ValueT"),
(
"py:class",
"opentelemetry.sdk._metrics._internal.instrument._Synchronous",
"opentelemetry.sdk.metrics._internal.instrument._Synchronous",
),
(
"py:class",
"opentelemetry.sdk._metrics._internal.instrument._Asynchronous",
"opentelemetry.sdk.metrics._internal.instrument._Asynchronous",
),
# Even if wrapt is added to intersphinx_mapping, sphinx keeps failing
# with "class reference target not found: ObjectProxy".
Expand Down
7 changes: 1 addition & 6 deletions docs/examples/metrics/README.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
OpenTelemetry Metrics SDK
=========================

.. warning::
OpenTelemetry Python metrics are in an experimental state. The APIs within
:mod:`opentelemetry.sdk._metrics` are subject to change in minor/patch releases and there are no
backward compatability guarantees at this time.

Start the Collector locally to see data being exported. Write the following file:

.. code-block:: yaml
Expand Down Expand Up @@ -45,4 +40,4 @@ The resulting metrics will appear in the output from the collector and look simi

.. code-block:: sh
TODO
TODO
14 changes: 7 additions & 7 deletions docs/examples/metrics/example.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from typing import Iterable

from opentelemetry._metrics import (
from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import (
OTLPMetricExporter,
)
from opentelemetry.metrics import (
CallbackOptions,
Observation,
get_meter_provider,
set_meter_provider,
)
from opentelemetry._metrics._internal.instrument import CallbackOptions
from opentelemetry.exporter.otlp.proto.grpc._metric_exporter import (
OTLPMetricExporter,
)
from opentelemetry.sdk._metrics import MeterProvider
from opentelemetry.sdk._metrics.export import PeriodicExportingMetricReader
from opentelemetry.sdk.metrics import MeterProvider
from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader

exporter = OTLPMetricExporter(insecure=True)
reader = PeriodicExportingMetricReader(exporter)
Expand Down
6 changes: 3 additions & 3 deletions docs/getting_started/metrics_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

from typing import Iterable

from opentelemetry._metrics import (
from opentelemetry.metrics import (
CallbackOptions,
Observation,
get_meter_provider,
set_meter_provider,
)
from opentelemetry.sdk._metrics import MeterProvider
from opentelemetry.sdk._metrics.export import (
from opentelemetry.sdk.metrics import MeterProvider
from opentelemetry.sdk.metrics.export import (
ConsoleMetricExporter,
PeriodicExportingMetricReader,
)
Expand Down
6 changes: 3 additions & 3 deletions docs/sdk/metrics.export.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
opentelemetry.sdk._metrics.export
=================================
opentelemetry.sdk.metrics.export
================================

.. automodule:: opentelemetry.sdk._metrics.export
.. automodule:: opentelemetry.sdk.metrics.export
:members:
:undoc-members:
:show-inheritance:
11 changes: 2 additions & 9 deletions docs/sdk/metrics.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
opentelemetry.sdk._metrics package
opentelemetry.sdk.metrics package
==================================

.. warning::
OpenTelemetry Python metrics are in an experimental state. The APIs within
:mod:`opentelemetry.sdk._metrics` are subject to change in minor/patch releases and there are no
backward compatability guarantees at this time.

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

Submodules
----------

Expand All @@ -16,7 +9,7 @@ Submodules
metrics.export
metrics.view

.. automodule:: opentelemetry.sdk._metrics
.. automodule:: opentelemetry.sdk.metrics
:members:
:undoc-members:
:show-inheritance:
6 changes: 3 additions & 3 deletions docs/sdk/metrics.view.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
opentelemetry.sdk._metrics.view
===============================
opentelemetry.sdk.metrics.view
==============================

.. automodule:: opentelemetry.sdk._metrics.view
.. automodule:: opentelemetry.sdk.metrics.view
:members:
:undoc-members:
:show-inheritance:
4 changes: 2 additions & 2 deletions eachdist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sortfirst=
exporter/*

[stable]
version=1.11.1
version=1.12.0rc1

packages=
opentelemetry-sdk
Expand All @@ -30,7 +30,7 @@ packages=
opentelemetry-api

[prerelease]
version=0.30b1
version=0.31b0

packages=
opentelemetry-opentracing-shim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.11.1"
__version__ = "1.12.0rc1"
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.11.1"
__version__ = "1.12.0rc1"
4 changes: 2 additions & 2 deletions exporter/opentelemetry-exporter-jaeger/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ package_dir=
=src
packages=find_namespace:
install_requires =
opentelemetry-exporter-jaeger-proto-grpc == 1.11.1
opentelemetry-exporter-jaeger-thrift == 1.11.1
opentelemetry-exporter-jaeger-proto-grpc == 1.12.0rc1
opentelemetry-exporter-jaeger-thrift == 1.12.0rc1

[options.packages.find]
where = src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.11.1"
__version__ = "1.12.0rc1"
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.30b1"
__version__ = "0.31b0"
2 changes: 1 addition & 1 deletion exporter/opentelemetry-exporter-otlp-proto-grpc/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ install_requires =
googleapis-common-protos ~= 1.52
opentelemetry-api ~= 1.3
opentelemetry-sdk ~= 1.11
opentelemetry-proto == 1.11.1
opentelemetry-proto == 1.12.0rc1
backoff >= 1.10.0, < 2.0.0

[options.extras_require]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
from opentelemetry.sdk.environment_variables import (
OTEL_EXPORTER_OTLP_METRICS_INSECURE,
)
from opentelemetry.sdk._metrics.export import (
from opentelemetry.sdk.metrics.export import (
Gauge,
Histogram,
Metric,
Sum,
)

from opentelemetry.sdk._metrics.export import (
from opentelemetry.sdk.metrics.export import (
MetricExporter,
MetricExportResult,
MetricsData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.11.1"
__version__ = "1.12.0rc1"
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from google.rpc.error_details_pb2 import RetryInfo
from grpc import StatusCode, server

from opentelemetry.exporter.otlp.proto.grpc._metric_exporter import (
from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import (
OTLPMetricExporter,
)
from opentelemetry.proto.collector.metrics.v1.metrics_service_pb2 import (
Expand All @@ -40,7 +40,10 @@
from opentelemetry.proto.resource.v1.resource_pb2 import (
Resource as OTLPResource,
)
from opentelemetry.sdk._metrics.export import (
from opentelemetry.sdk.environment_variables import (
OTEL_EXPORTER_OTLP_METRICS_INSECURE,
)
from opentelemetry.sdk.metrics.export import (
AggregationTemporality,
Histogram,
HistogramDataPoint,
Expand All @@ -50,9 +53,6 @@
ResourceMetrics,
ScopeMetrics,
)
from opentelemetry.sdk.environment_variables import (
OTEL_EXPORTER_OTLP_METRICS_INSECURE,
)
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.util.instrumentation import (
InstrumentationScope as SDKInstrumentationScope,
Expand Down Expand Up @@ -303,7 +303,7 @@ def tearDown(self):
)
@patch("opentelemetry.exporter.otlp.proto.grpc.exporter.secure_channel")
@patch(
"opentelemetry.exporter.otlp.proto.grpc._metric_exporter.OTLPMetricExporter._stub"
"opentelemetry.exporter.otlp.proto.grpc.metric_exporter.OTLPMetricExporter._stub"
)
# pylint: disable=unused-argument
def test_no_credentials_error(
Expand Down
2 changes: 1 addition & 1 deletion exporter/opentelemetry-exporter-otlp-proto-http/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ install_requires =
googleapis-common-protos ~= 1.52
opentelemetry-api ~= 1.3
opentelemetry-sdk ~= 1.11
opentelemetry-proto == 1.11.1
opentelemetry-proto == 1.12.0rc1
backoff >= 1.10.0, < 2.0.0

[options.extras_require]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.11.1"
__version__ = "1.12.0rc1"
4 changes: 2 additions & 2 deletions exporter/opentelemetry-exporter-otlp/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ package_dir=
=src
packages=find_namespace:
install_requires =
opentelemetry-exporter-otlp-proto-grpc == 1.11.1
opentelemetry-exporter-otlp-proto-http == 1.11.1
opentelemetry-exporter-otlp-proto-grpc == 1.12.0rc1
opentelemetry-exporter-otlp-proto-http == 1.12.0rc1

[options.packages.find]
where = src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.11.1"
__version__ = "1.12.0rc1"
2 changes: 1 addition & 1 deletion exporter/opentelemetry-exporter-otlp/tests/test_otlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from opentelemetry.exporter.otlp.proto.grpc._log_exporter import (
OTLPLogExporter,
)
from opentelemetry.exporter.otlp.proto.grpc._metric_exporter import (
from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import (
OTLPMetricExporter,
)
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
from prometheus_client import start_http_server
from opentelemetry._metrics import get_meter_provider, set_meter_provider
from opentelemetry.exporter.prometheus import PrometheusMetricReader
from opentelemetry.sdk._metrics import MeterProvider
from opentelemetry.metrics import get_meter_provider, set_meter_provider
from opentelemetry.sdk.metrics import MeterProvider
# Start Prometheus client
start_http_server(port=8000, addr="localhost")
Expand Down Expand Up @@ -77,7 +77,7 @@
)
from prometheus_client.core import Metric as PrometheusMetric

from opentelemetry.sdk._metrics.export import (
from opentelemetry.sdk.metrics.export import (
Gauge,
Histogram,
HistogramDataPoint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.30b1"
__version__ = "1.12.0rc1"
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
PrometheusMetricReader,
_CustomCollector,
)
from opentelemetry.sdk._metrics.export import (
from opentelemetry.sdk.metrics.export import (
AggregationTemporality,
Histogram,
HistogramDataPoint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.11.1"
__version__ = "1.12.0rc1"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ install_requires =
requests ~= 2.7
opentelemetry-api ~= 1.3
opentelemetry-sdk ~= 1.11
opentelemetry-exporter-zipkin-json == 1.11.1
opentelemetry-exporter-zipkin-json == 1.12.0rc1

[options.packages.find]
where = src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.11.1"
__version__ = "1.12.0rc1"
Loading

0 comments on commit a34d813

Please sign in to comment.