Skip to content

Commit

Permalink
Merge branch 'main' into 3_12
Browse files Browse the repository at this point in the history
  • Loading branch information
xrmx authored Jun 6, 2024
2 parents 8775d58 + 762bd8f commit a3875b1
Show file tree
Hide file tree
Showing 79 changed files with 946 additions and 173 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: 9ce1c26d2732dfbdadbb492fc38c562dcd08ed2e
CONTRIB_REPO_SHA: 7d4573da89c7aef748614e6f1511be3eddf5b230

# 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@v4 which
Expand Down
6 changes: 5 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ disable=missing-docstring,
unused-argument, # temp-pylint-upgrade
redefined-builtin,
cyclic-import,
broad-exception-raised,

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down Expand Up @@ -481,3 +480,8 @@ max-statements=50

# Minimum number of public methods for a class (see R0903).
min-public-methods=2

[EXCEPTIONS]

# Exceptions that will emit a warning when being caught.
overgeneral-exceptions=builtins.Exception
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Add Python 3.12 to tox
([#3616](https://github.com/open-telemetry/opentelemetry-python/pull/3616))

## Version 1.25.0/0.46b0 (2024-05-30)

- Fix class BoundedAttributes to have RLock rather than Lock
([#3859](https://github.com/open-telemetry/opentelemetry-python/pull/3859))
- Remove thread lock by loading RuntimeContext explicitly.
([#3763](https://github.com/open-telemetry/opentelemetry-python/pull/3763))
- Update proto version to v1.2.0
Expand Down Expand Up @@ -38,6 +43,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#3823] (https://github.com/open-telemetry/opentelemetry-python/pull/3823))
- Add span flags to OTLP spans and links
([#3881](https://github.com/open-telemetry/opentelemetry-python/pull/3881))
- Record links with invalid SpanContext if either attributes or TraceState are not empty
([#3917](https://github.com/open-telemetry/opentelemetry-python/pull/3917/))
- Add OpenTelemetry trove classifiers to PyPI packages
([#3913] (https://github.com/open-telemetry/opentelemetry-python/pull/3913))
- Fix prometheus metric name and unit conversion
([#3924](https://github.com/open-telemetry/opentelemetry-python/pull/3924))
- this is a breaking change to prometheus metric names so they comply with the
[specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.33.0/specification/compatibility/prometheus_and_openmetrics.md#otlp-metric-points-to-prometheus).
- you can temporarily opt-out of the unit normalization by setting the environment variable
`OTEL_PYTHON_EXPERIMENTAL_DISABLE_PROMETHEUS_UNIT_NORMALIZATION=true`
- common unit abbreviations are converted to Prometheus conventions (`s` -> `seconds`),
following the [collector's implementation](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/c0b51136575aa7ba89326d18edb4549e7e1bbdb9/pkg/translator/prometheus/normalize_name.go#L108)
- repeated `_` are replaced with a single `_`
- unit annotations (enclosed in curly braces like `{requests}`) are stripped away
- units with slash are converted e.g. `m/s` -> `meters_per_second`.
- The exporter's API is not changed
- Add parameters for Distros and configurators to configure autoinstrumentation in addition to existing environment variables.
([#3864] (https://github.com/open-telemetry/opentelemetry-python/pull/3864))

## Version 1.24.0/0.45b0 (2024-03-28)

Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on how to become a [**Member**](https://github.com/open-telemetry/community/blob
[**Approver**](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver)
and [**Maintainer**](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer).

Before you can contribute, you will need to sign the [Contributor License Agreement](https://docs.linuxfoundation.org/lfx/easycla/contributors).

Please also read the [OpenTelemetry Contributor Guide](https://github.com/open-telemetry/community/blob/main/CONTRIBUTING.md).

# Find your right repo

This is the main repo for OpenTelemetry Python. Nevertheless, there are other repos that are related to this project.
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/tests/test_flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ def test_flask(self):
output = str(server.stdout.read())
self.assertIn('"name": "GET"', output)
self.assertIn('"name": "example-request"', output)
self.assertIn('"name": "/"', output)
self.assertIn('"name": "GET /"', output)
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.25.0.dev
version=1.26.0.dev

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

[prerelease]
version=0.46b0.dev
version=0.47b0.dev

packages=
opentelemetry-opentracing-shim
Expand Down
4 changes: 3 additions & 1 deletion exporter/opentelemetry-exporter-opencensus/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ authors = [
]
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: OpenTelemetry",
"Framework :: OpenTelemetry :: Exporters",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
Expand All @@ -28,7 +30,7 @@ classifiers = [
dependencies = [
"grpcio >= 1.0.0, < 2.0.0",
"opencensus-proto >= 0.1.0, < 1.0.0",
"opentelemetry-api >= 1.25.0.dev",
"opentelemetry-api >= 1.26.0.dev",
"opentelemetry-sdk >= 1.15",
"protobuf ~= 3.13",
"setuptools >= 16.0",
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.46b0.dev"
__version__ = "0.47b0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ authors = [
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: OpenTelemetry",
"Framework :: OpenTelemetry :: Exporters",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
Expand All @@ -25,7 +27,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
]
dependencies = [
"opentelemetry-proto == 1.25.0.dev",
"opentelemetry-proto == 1.26.0.dev",
]

[project.urls]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ def _encode_attributes(
if attributes:
pb2_attributes = []
for key, value in attributes.items():
# pylint: disable=broad-exception-caught
try:
pb2_attributes.append(_encode_key_value(key, value))
except Exception as error: # pylint: disable=broad-except
except Exception as error:
_logger.exception(error)
else:
pb2_attributes = None
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.25.0.dev"
__version__ = "1.26.0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ authors = [
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: OpenTelemetry",
"Framework :: OpenTelemetry :: Exporters",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
Expand All @@ -29,9 +31,9 @@ dependencies = [
"googleapis-common-protos ~= 1.52",
"grpcio >= 1.0.0, < 2.0.0",
"opentelemetry-api ~= 1.15",
"opentelemetry-proto == 1.25.0.dev",
"opentelemetry-sdk ~= 1.25.0.dev",
"opentelemetry-exporter-otlp-proto-common == 1.25.0.dev",
"opentelemetry-proto == 1.26.0.dev",
"opentelemetry-sdk ~= 1.26.0.dev",
"opentelemetry-exporter-otlp-proto-common == 1.26.0.dev",
]

[project.entry-points.opentelemetry_logs_exporter]
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.25.0.dev"
__version__ = "1.26.0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ authors = [
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: OpenTelemetry",
"Framework :: OpenTelemetry :: Exporters",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
Expand All @@ -28,9 +30,9 @@ dependencies = [
"Deprecated >= 1.2.6",
"googleapis-common-protos ~= 1.52",
"opentelemetry-api ~= 1.15",
"opentelemetry-proto == 1.25.0.dev",
"opentelemetry-sdk ~= 1.25.0.dev",
"opentelemetry-exporter-otlp-proto-common == 1.25.0.dev",
"opentelemetry-proto == 1.26.0.dev",
"opentelemetry-sdk ~= 1.26.0.dev",
"opentelemetry-exporter-otlp-proto-common == 1.26.0.dev",
"requests ~= 2.7",
]

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.25.0.dev"
__version__ = "1.26.0.dev"
6 changes: 4 additions & 2 deletions exporter/opentelemetry-exporter-otlp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ authors = [
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: OpenTelemetry",
"Framework :: OpenTelemetry :: Exporters",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
Expand All @@ -26,8 +28,8 @@ classifiers = [
"Typing :: Typed",
]
dependencies = [
"opentelemetry-exporter-otlp-proto-grpc == 1.25.0.dev",
"opentelemetry-exporter-otlp-proto-http == 1.25.0.dev",
"opentelemetry-exporter-otlp-proto-grpc == 1.26.0.dev",
"opentelemetry-exporter-otlp-proto-http == 1.26.0.dev",
]

[project.entry-points.opentelemetry_logs_exporter]
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.25.0.dev"
__version__ = "1.26.0.dev"
4 changes: 3 additions & 1 deletion exporter/opentelemetry-exporter-prometheus/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ authors = [
]
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: OpenTelemetry",
"Framework :: OpenTelemetry :: Exporters",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
Expand All @@ -27,7 +29,7 @@ classifiers = [
dependencies = [
"opentelemetry-api ~= 1.12",
# DONOTMERGE: confirm that this will becomes ~= 1.21 in the next release
"opentelemetry-sdk ~= 1.25.0.dev",
"opentelemetry-sdk ~= 1.26.0.dev",
"prometheus_client >= 0.5.0, < 1.0.0",
]

Expand Down
Loading

0 comments on commit a3875b1

Please sign in to comment.