Skip to content

Commit

Permalink
Merge branch 'main' into issues3449
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanthccv authored Dec 31, 2023
2 parents a5057b0 + da48e0b commit 7f6350c
Show file tree
Hide file tree
Showing 37 changed files with 84 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
name: OpenTelemetry Python SDK Benchmarks - Python ${{ env[matrix.python-version ]}} - SDK
tool: pytest
output-file-path: opentelemetry-sdk/tests/output.json
gh-pages-branch: benchmarks
gh-pages-branch: gh-pages
github-token: ${{ secrets.GITHUB_TOKEN }}
# Make a commit on `gh-pages` with benchmarks from previous step
benchmark-data-dir-path: "benchmarks"
Expand Down
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: 21b26b39c62b27b116978813d47b9b7d104b54be
CONTRIB_REPO_SHA: 2977f143df1d474735e8bdfecd91d92d534e80dc
# 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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## Version 1.22.0/0.43b0 (2023-12-15)

- Prometheus exporter sanitize info metric ([#3572](https://github.com/open-telemetry/opentelemetry-python/pull/3572))
- Remove Jaeger exporters
([#3554](https://github.com/open-telemetry/opentelemetry-python/pull/3554))
- Log stacktrace on `UNKNOWN` status OTLP export error
([#3536](https://github.com/open-telemetry/opentelemetry-python/pull/3536))
- Fix OTLPExporterMixin shutdown timeout period
([#3524](https://github.com/open-telemetry/opentelemetry-python/pull/3524))
- Handle `taskName` `logrecord` attribute
([#3557](https://github.com/open-telemetry/opentelemetry-python/pull/3557))

## Version 1.21.0/0.42b0 (2023-11-01)

Expand Down
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.22.0.dev
version=1.23.0.dev

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

[prerelease]
version=0.43b0.dev
version=0.44b0.dev

packages=
opentelemetry-opentracing-shim
Expand Down
2 changes: 1 addition & 1 deletion exporter/opentelemetry-exporter-opencensus/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ classifiers = [
dependencies = [
"grpcio >= 1.0.0, < 2.0.0",
"opencensus-proto >= 0.1.0, < 1.0.0",
"opentelemetry-api >= 1.22.0.dev",
"opentelemetry-api >= 1.23.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.43b0.dev"
__version__ = "0.44b0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
]
dependencies = [
"opentelemetry-proto == 1.22.0.dev",
"opentelemetry-proto == 1.23.0.dev",
"backoff >= 1.10.0, < 2.0.0; python_version<'3.7'",
"backoff >= 1.10.0, < 3.0.0; python_version>='3.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.22.0.dev"
__version__ = "1.23.0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ dependencies = [
"googleapis-common-protos ~= 1.52",
"grpcio >= 1.0.0, < 2.0.0",
"opentelemetry-api ~= 1.15",
"opentelemetry-proto == 1.22.0.dev",
"opentelemetry-sdk ~= 1.22.0.dev",
"opentelemetry-exporter-otlp-proto-common == 1.22.0.dev",
"opentelemetry-proto == 1.23.0.dev",
"opentelemetry-sdk ~= 1.23.0.dev",
"opentelemetry-exporter-otlp-proto-common == 1.23.0.dev",
]

[project.optional-dependencies]
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.22.0.dev"
__version__ = "1.23.0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ dependencies = [
"backoff >= 1.10.0, < 3.0.0; python_version>='3.7'",
"googleapis-common-protos ~= 1.52",
"opentelemetry-api ~= 1.15",
"opentelemetry-proto == 1.22.0.dev",
"opentelemetry-sdk ~= 1.22.0.dev",
"opentelemetry-exporter-otlp-proto-common == 1.22.0.dev",
"opentelemetry-proto == 1.23.0.dev",
"opentelemetry-sdk ~= 1.23.0.dev",
"opentelemetry-exporter-otlp-proto-common == 1.23.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.22.0.dev"
__version__ = "1.23.0.dev"
4 changes: 2 additions & 2 deletions exporter/opentelemetry-exporter-otlp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ classifiers = [
"Typing :: Typed",
]
dependencies = [
"opentelemetry-exporter-otlp-proto-grpc == 1.22.0.dev",
"opentelemetry-exporter-otlp-proto-http == 1.22.0.dev",
"opentelemetry-exporter-otlp-proto-grpc == 1.23.0.dev",
"opentelemetry-exporter-otlp-proto-http == 1.23.0.dev",
]

[project.optional-dependencies]
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.22.0.dev"
__version__ = "1.23.0.dev"
2 changes: 1 addition & 1 deletion exporter/opentelemetry-exporter-prometheus/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ classifiers = [
dependencies = [
"opentelemetry-api ~= 1.12",
# DONOTMERGE: confirm that this will becomes ~= 1.21 in the next release
"opentelemetry-sdk ~= 1.22.0.dev",
"opentelemetry-sdk ~= 1.23.0.dev",
"prometheus_client >= 0.5.0, < 1.0.0",
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,10 @@ def _create_info_metric(
self, name: str, description: str, attributes: Dict[str, str]
) -> InfoMetricFamily:
"""Create an Info Metric Family with list of attributes"""
# sanitize the attribute names according to Prometheus rule
attributes = {
self._sanitize(key): value for key, value in attributes.items()
}
info = InfoMetricFamily(name, description, labels=attributes)
info.add_metric(labels=list(attributes.keys()), value=attributes)
return info
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.43b0.dev"
__version__ = "0.44b0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -389,3 +389,35 @@ def test_target_info_disabled(self):
)
self.assertNotIn("os", prometheus_metric.samples[0].labels)
self.assertNotIn("histo", prometheus_metric.samples[0].labels)

def test_target_info_sanitize(self):
metric_reader = PrometheusMetricReader()
provider = MeterProvider(
metric_readers=[metric_reader],
resource=Resource(
{
"system.os": "Unix",
"system.name": "Prometheus Target Sanitize",
}
),
)
meter = provider.get_meter("getting-started", "0.1.2")
counter = meter.create_counter("counter")
counter.add(1)
prometheus_metric = list(metric_reader._collector.collect())[0]

self.assertEqual(type(prometheus_metric), InfoMetricFamily)
self.assertEqual(prometheus_metric.name, "target")
self.assertEqual(prometheus_metric.documentation, "Target metadata")
self.assertTrue(len(prometheus_metric.samples) == 1)
self.assertEqual(prometheus_metric.samples[0].value, 1)
self.assertTrue(len(prometheus_metric.samples[0].labels) == 2)
self.assertTrue("system_os" in prometheus_metric.samples[0].labels)
self.assertEqual(
prometheus_metric.samples[0].labels["system_os"], "Unix"
)
self.assertTrue("system_name" in prometheus_metric.samples[0].labels)
self.assertEqual(
prometheus_metric.samples[0].labels["system_name"],
"Prometheus Target Sanitize",
)
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.22.0.dev"
__version__ = "1.23.0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.3",
"opentelemetry-exporter-zipkin-json == 1.22.0.dev",
"opentelemetry-exporter-zipkin-json == 1.23.0.dev",
"opentelemetry-sdk ~= 1.11",
"protobuf ~= 3.12",
"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.22.0.dev"
__version__ = "1.23.0.dev"
4 changes: 2 additions & 2 deletions exporter/opentelemetry-exporter-zipkin/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ classifiers = [
"Typing :: Typed",
]
dependencies = [
"opentelemetry-exporter-zipkin-json == 1.22.0.dev",
"opentelemetry-exporter-zipkin-proto-http == 1.22.0.dev",
"opentelemetry-exporter-zipkin-json == 1.23.0.dev",
"opentelemetry-exporter-zipkin-proto-http == 1.23.0.dev",
]

[project.optional-dependencies]
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.22.0.dev"
__version__ = "1.23.0.dev"
2 changes: 1 addition & 1 deletion opentelemetry-api/src/opentelemetry/version.py
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.22.0.dev"
__version__ = "1.23.0.dev"
2 changes: 1 addition & 1 deletion opentelemetry-proto/src/opentelemetry/proto/version.py
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.22.0.dev"
__version__ = "1.23.0.dev"
4 changes: 2 additions & 2 deletions opentelemetry-sdk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ classifiers = [
"Typing :: Typed",
]
dependencies = [
"opentelemetry-api == 1.22.0.dev",
"opentelemetry-semantic-conventions == 0.43b0.dev",
"opentelemetry-api == 1.23.0.dev",
"opentelemetry-semantic-conventions == 0.44b0.dev",
"typing-extensions >= 3.7.4",
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ def force_flush(self, timeout_millis: int = 30000) -> bool:
"stack_info",
"thread",
"threadName",
"taskName",
)
)

Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/src/opentelemetry/sdk/version.py
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.22.0.dev"
__version__ = "1.23.0.dev"
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.43b0.dev"
__version__ = "0.44b0.dev"
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.22.0.dev"
__version__ = "1.23.0.dev"
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.22.0.dev"
__version__ = "1.23.0.dev"
2 changes: 1 addition & 1 deletion shim/opentelemetry-opencensus-shim/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies = [

[project.optional-dependencies]
test = [
"opentelemetry-test-utils == 0.43b0.dev",
"opentelemetry-test-utils == 0.44b0.dev",
"opencensus == 0.11.1",
# Temporary fix for https://github.com/census-instrumentation/opencensus-python/issues/1219
"six == 1.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.43b0.dev"
__version__ = "0.44b0.dev"
2 changes: 1 addition & 1 deletion shim/opentelemetry-opentracing-shim/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies = [

[project.optional-dependencies]
test = [
"opentelemetry-test-utils == 0.43b0.dev",
"opentelemetry-test-utils == 0.44b0.dev",
"opentracing ~= 2.2.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.43b0.dev"
__version__ = "0.44b0.dev"
4 changes: 2 additions & 2 deletions tests/opentelemetry-test-utils/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ classifiers = [
]
dependencies = [
"asgiref ~= 3.0",
"opentelemetry-api == 1.22.0.dev",
"opentelemetry-sdk == 1.22.0.dev",
"opentelemetry-api == 1.23.0.dev",
"opentelemetry-sdk == 1.23.0.dev",
]

[project.optional-dependencies]
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.43b0.dev"
__version__ = "0.44b0.dev"

0 comments on commit 7f6350c

Please sign in to comment.