From 7c67637716261fd2c62c2350b731af8b02e06d5a Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Mon, 22 Apr 2024 13:29:01 -0500 Subject: [PATCH 1/9] Update action versions (#3867) Fixes #3866 --- .github/workflows/backport.yml | 2 +- .github/workflows/benchmarks.yml | 6 +++--- .github/workflows/changelog.yml | 4 ++-- .github/workflows/check-links.yml | 6 +++--- .github/workflows/codeql-analysis.yml | 8 +++---- .github/workflows/prepare-patch-release.yml | 2 +- .github/workflows/prepare-release-branch.yml | 6 +++--- .github/workflows/public-api-check.yml | 4 ++-- .github/workflows/release.yml | 10 ++++----- .github/workflows/test.yml | 22 ++++++++++---------- 10 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 9510b88fc83..26789093f25 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -16,7 +16,7 @@ jobs: exit 1 fi - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: # history is needed to run git cherry-pick below fetch-depth: 0 diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 1191c2d0da3..aa909250ad8 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -18,9 +18,9 @@ jobs: os: [ubuntu-20.04, windows-2019] steps: - name: Checkout Core Repo @ SHA - ${{ github.sha }} - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python ${{ env[matrix.python-version] }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ env[matrix.python-version] }} architecture: 'x64' @@ -28,7 +28,7 @@ jobs: run: pip install tox - name: Cache tox environment # Preserves .tox directory between runs for faster installs - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | .tox diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 5238e01c4b5..491ddd27fae 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -18,7 +18,7 @@ jobs: && github.actor != 'opentelemetrybot' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Check for CHANGELOG changes run: | @@ -33,4 +33,4 @@ jobs: echo "No CHANGELOG was modified." echo "Please add a CHANGELOG entry, or add the \"Skip Changelog\" label if not required." false - fi \ No newline at end of file + fi diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index f298f6d2919..d9d1514076b 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -13,7 +13,7 @@ jobs: md: ${{ steps.changes.outputs.md }} steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Get changed files @@ -26,7 +26,7 @@ jobs: if: ${{needs.changedfiles.outputs.md}} steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -39,4 +39,4 @@ jobs: --verbose \ --config .github/workflows/check_links_config.json \ ${{needs.changedfiles.outputs.md}} \ - || { echo "Check that anchor links are lowercase"; exit 1; } \ No newline at end of file + || { echo "Check that anchor links are lowercase"; exit 1; } diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b979a3121ba..8ef01d21cb2 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -20,16 +20,16 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v3 with: languages: python - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 \ No newline at end of file + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml index 30fa2d15ad0..90aa911d2f3 100644 --- a/.github/workflows/prepare-patch-release.yml +++ b/.github/workflows/prepare-patch-release.yml @@ -6,7 +6,7 @@ jobs: prepare-patch-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: | if [[ ! $GITHUB_REF_NAME =~ ^release/v[0-9]+\.[0-9]+\.x-0\.[0-9]+bx$ ]]; then diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index 59c86b62de8..936a41f5e77 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -10,7 +10,7 @@ jobs: prereqs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Verify prerequisites env: @@ -39,7 +39,7 @@ jobs: runs-on: ubuntu-latest needs: prereqs steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Create release branch env: @@ -103,7 +103,7 @@ jobs: runs-on: ubuntu-latest needs: prereqs steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set environment variables env: diff --git a/.github/workflows/public-api-check.yml b/.github/workflows/public-api-check.yml index 67dcb798310..00c59f94bed 100644 --- a/.github/workflows/public-api-check.yml +++ b/.github/workflows/public-api-check.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout the repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -29,7 +29,7 @@ jobs: run: git checkout ${{ github.event.pull_request.head.sha }} - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.10' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 39bc3fe993c..b45ff25e719 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: exit 1 fi - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set environment variables run: | @@ -56,15 +56,15 @@ jobs: # check out main branch to verify there won't be problems with merging the change log # at the end of this workflow - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: main # back to the release branch - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # next few steps publish to pypi - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v5 with: python-version: '3.8' @@ -127,7 +127,7 @@ jobs: --discussion-category announcements \ v$STABLE_VERSION - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: # the step below is creating a pull request against main ref: main diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5df83e92ce8..ea99698faaa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ env: # changes. CONTRIB_REPO_SHA: 9ce1c26d2732dfbdadbb492fc38c562dcd08ed2e # 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 + # When running contrib builds as part of core builds, we use actions/checkout@v4 which # does not set an environment variable (simply just runs tox), which is different when # contrib builds are run directly from contrib (since test.yml is executed, which sets CORE_REPO_SHA) # The solution is to include CORE_REPO_SHA as part of THIS environment so it can be accessed @@ -67,9 +67,9 @@ jobs: steps: - name: Checkout Core Repo @ SHA - ${{ github.sha }} - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python ${{ env[matrix.python-version] }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ env[matrix.python-version] }} architecture: 'x64' @@ -77,7 +77,7 @@ jobs: run: pip install tox - name: Cache tox environment # Preserves .tox directory between runs for faster installs - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | .tox @@ -100,9 +100,9 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout Core Repo @ SHA - ${{ github.sha }} - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.10' architecture: 'x64' @@ -110,7 +110,7 @@ jobs: run: pip install tox - name: Cache tox environment # Preserves .tox directory between runs for faster installs - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | .tox @@ -183,17 +183,17 @@ jobs: os: [ubuntu-20.04] steps: - name: Checkout Contrib Repo @ SHA - ${{ env.CONTRIB_REPO_SHA }} - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: repository: open-telemetry/opentelemetry-python-contrib ref: ${{ env.CONTRIB_REPO_SHA }} - name: Checkout Core Repo @ SHA ${{ github.sha }} - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: repository: open-telemetry/opentelemetry-python path: opentelemetry-python-core - name: Set up Python ${{ env[matrix.python-version] }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ env[matrix.python-version] }} architecture: 'x64' @@ -201,7 +201,7 @@ jobs: run: pip install tox - name: Cache tox environment # Preserves .tox directory between runs for faster installs - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | .tox From 80beade641b52627b9bd0f7186bc3570bd1399d5 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Mon, 22 Apr 2024 20:28:53 -0500 Subject: [PATCH 2/9] Fix release trigger --- .github/workflows/sigstore.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sigstore.yml b/.github/workflows/sigstore.yml index 861340a6903..21c0f9382e2 100644 --- a/.github/workflows/sigstore.yml +++ b/.github/workflows/sigstore.yml @@ -1,7 +1,8 @@ name: Sigstore on: - workflow_dispatch: + release: + types: [published] jobs: sign-pyproject: From 7f4ffcdbebaf8566347d825f5ab7da746b306020 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Mon, 22 Apr 2024 20:40:31 -0500 Subject: [PATCH 3/9] WPI --- .github/workflows/sigstore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sigstore.yml b/.github/workflows/sigstore.yml index 21c0f9382e2..1ebe6a161bd 100644 --- a/.github/workflows/sigstore.yml +++ b/.github/workflows/sigstore.yml @@ -40,7 +40,7 @@ jobs: - name: Upload release asset uses: actions/upload-release-asset@v1 - with: + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  with:  upload_url: ${{ github.event.release.upload_url }} From dfdd735261f2eaecea161b3f52b5efa53f2b23ed Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Mon, 22 Apr 2024 20:44:08 -0500 Subject: [PATCH 4/9] woer --- .github/workflows/sigstore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sigstore.yml b/.github/workflows/sigstore.yml index 1ebe6a161bd..6b572750b8c 100644 --- a/.github/workflows/sigstore.yml +++ b/.github/workflows/sigstore.yml @@ -44,6 +44,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  with:  upload_url: ${{ github.event.release.upload_url }} - asset_path: pyproject_sigstore.zip + asset_path: ./pyproject_sigstore.zip  asset_name: PYPROJECT_SIGSTORE.zip  asset_content_type: application/zip From 55c573649c236398fd1ac3a8f9039bb11bc7a8fd Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Mon, 22 Apr 2024 20:46:04 -0500 Subject: [PATCH 5/9] sdf --- .github/workflows/sigstore.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sigstore.yml b/.github/workflows/sigstore.yml index 6b572750b8c..f479e46d027 100644 --- a/.github/workflows/sigstore.yml +++ b/.github/workflows/sigstore.yml @@ -42,8 +42,8 @@ jobs: uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: -  upload_url: ${{ github.event.release.upload_url }} - asset_path: ./pyproject_sigstore.zip - asset_name: PYPROJECT_SIGSTORE.zip - asset_content_type: application/zip + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./pyproject_sigstore.zip + asset_name: PYPROJECT_SIGSTORE.zip + asset_content_type: application/zip From afc3acef6d32b26511f1ad7080493225015afaac Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Tue, 23 Apr 2024 17:01:32 +0200 Subject: [PATCH 6/9] Bump black to 24.3.0 (#3871) --- .flake8 | 4 ++ dev-requirements.txt | 2 +- .../opencensus/trace_exporter/__init__.py | 8 +-- .../exporter/prometheus/__init__.py | 48 +++++++-------- .../propagators/test_w3cbaggagepropagator.py | 20 ++++--- .../sdk/_configuration/__init__.py | 21 +++++-- .../sdk/_logs/_internal/__init__.py | 28 +++++---- .../sdk/metrics/_internal/export/__init__.py | 60 +++++++++---------- .../_internal/metric_reader_storage.py | 12 ++-- .../opentelemetry/sdk/resources/__init__.py | 10 ++-- .../src/opentelemetry/sdk/trace/__init__.py | 30 ++++++---- .../src/opentelemetry/sdk/util/__init__.py | 6 +- .../metrics/integration_test/test_cpu_time.py | 6 +- ...t_explicit_bucket_histogram_aggregation.py | 8 ++- .../tests/resources/test_resources.py | 6 +- .../shim/opencensus/_shim_span.py | 12 ++-- .../tests/test_shim.py | 2 +- 17 files changed, 156 insertions(+), 127 deletions(-) diff --git a/.flake8 b/.flake8 index 83786a686a7..8e17b0ab21a 100644 --- a/.flake8 +++ b/.flake8 @@ -12,6 +12,10 @@ ignore = # allow whitespace before ':' (https://github.com/psf/black#slices) E203 + # conflicts with black + E701 + E704 + exclude = .bzr .git diff --git a/dev-requirements.txt b/dev-requirements.txt index 01f46ae87e9..90385cc6fab 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,7 +1,7 @@ pylint==3.0.2 flake8==6.1.0 isort==5.12.0 -black==22.3.0 +black==24.3.0 httpretty==1.1.4 mypy==1.9.0 sphinx==7.1.2 diff --git a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/trace_exporter/__init__.py b/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/trace_exporter/__init__.py index b855728cad5..e5d7e6239a8 100644 --- a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/trace_exporter/__init__.py +++ b/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/trace_exporter/__init__.py @@ -133,11 +133,11 @@ def translate_to_collector(spans: Sequence[ReadableSpan]): collector_span.parent_span_id = parent_id.to_bytes(8, "big") if span.context.trace_state is not None: - for (key, value) in span.context.trace_state.items(): + for key, value in span.context.trace_state.items(): collector_span.tracestate.entries.add(key=key, value=value) if span.attributes: - for (key, value) in span.attributes.items(): + for key, value in span.attributes.items(): utils.add_proto_attribute_value( collector_span.attributes, key, value ) @@ -150,7 +150,7 @@ def translate_to_collector(spans: Sequence[ReadableSpan]): ) if event.attributes: - for (key, value) in event.attributes.items(): + for key, value in event.attributes.items(): utils.add_proto_attribute_value( collector_annotation.attributes, key, value ) @@ -183,7 +183,7 @@ def translate_to_collector(spans: Sequence[ReadableSpan]): ) if link.attributes: - for (key, value) in link.attributes.items(): + for key, value in link.attributes.items(): utils.add_proto_attribute_value( collector_span_link.attributes, key, value ) diff --git a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py b/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py index 6cde540ef6f..a84e21214d7 100644 --- a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py +++ b/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py @@ -196,9 +196,9 @@ def collect(self) -> None: self._target_info = self._create_info_metric( _TARGET_INFO_NAME, _TARGET_INFO_DESCRIPTION, attributes ) - metric_family_id_metric_family[ - _TARGET_INFO_NAME - ] = self._target_info + metric_family_id_metric_family[_TARGET_INFO_NAME] = ( + self._target_info + ) while self._metrics_datas: self._translate_to_prometheus( @@ -294,13 +294,13 @@ def _translate_to_prometheus( ) if metric_family_id not in metric_family_id_metric_family: - metric_family_id_metric_family[ - metric_family_id - ] = CounterMetricFamily( - name=metric_name, - documentation=metric_description, - labels=label_keys, - unit=metric.unit, + metric_family_id_metric_family[metric_family_id] = ( + CounterMetricFamily( + name=metric_name, + documentation=metric_description, + labels=label_keys, + unit=metric.unit, + ) ) metric_family_id_metric_family[ metric_family_id @@ -318,13 +318,13 @@ def _translate_to_prometheus( metric_family_id not in metric_family_id_metric_family.keys() ): - metric_family_id_metric_family[ - metric_family_id - ] = GaugeMetricFamily( - name=metric_name, - documentation=metric_description, - labels=label_keys, - unit=metric.unit, + metric_family_id_metric_family[metric_family_id] = ( + GaugeMetricFamily( + name=metric_name, + documentation=metric_description, + labels=label_keys, + unit=metric.unit, + ) ) metric_family_id_metric_family[ metric_family_id @@ -339,13 +339,13 @@ def _translate_to_prometheus( metric_family_id not in metric_family_id_metric_family.keys() ): - metric_family_id_metric_family[ - metric_family_id - ] = HistogramMetricFamily( - name=metric_name, - documentation=metric_description, - labels=label_keys, - unit=metric.unit, + metric_family_id_metric_family[metric_family_id] = ( + HistogramMetricFamily( + name=metric_name, + documentation=metric_description, + labels=label_keys, + unit=metric.unit, + ) ) metric_family_id_metric_family[ metric_family_id diff --git a/opentelemetry-api/tests/propagators/test_w3cbaggagepropagator.py b/opentelemetry-api/tests/propagators/test_w3cbaggagepropagator.py index ccc4b3cb2d0..99e37652ab0 100644 --- a/opentelemetry-api/tests/propagators/test_w3cbaggagepropagator.py +++ b/opentelemetry-api/tests/propagators/test_w3cbaggagepropagator.py @@ -134,11 +134,13 @@ def test_header_max_entries_skip_invalid_entry(self): self._extract( ",".join( [ - f"key{index}=value{index}" - if index != 2 - else ( - f"key{index}=" - f"value{'s' * (W3CBaggagePropagator._MAX_PAIR_LENGTH + 1)}" + ( + f"key{index}=value{index}" + if index != 2 + else ( + f"key{index}=" + f"value{'s' * (W3CBaggagePropagator._MAX_PAIR_LENGTH + 1)}" + ) ) for index in range( W3CBaggagePropagator._MAX_PAIRS + 1 @@ -162,9 +164,11 @@ def test_header_max_entries_skip_invalid_entry(self): self._extract( ",".join( [ - f"key{index}=value{index}" - if index != 2 - else f"key{index}xvalue{index}" + ( + f"key{index}=value{index}" + if index != 2 + else f"key{index}xvalue{index}" + ) for index in range( W3CBaggagePropagator._MAX_PAIRS + 1 ) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py index 33c5147a599..14c560c41b0 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py @@ -265,7 +265,10 @@ def _import_exporters( metric_exporters = {} log_exporters = {} - for (exporter_name, exporter_impl,) in _import_config_components( + for ( + exporter_name, + exporter_impl, + ) in _import_config_components( trace_exporter_names, "opentelemetry_traces_exporter" ): if issubclass(exporter_impl, SpanExporter): @@ -273,7 +276,10 @@ def _import_exporters( else: raise RuntimeError(f"{exporter_name} is not a trace exporter") - for (exporter_name, exporter_impl,) in _import_config_components( + for ( + exporter_name, + exporter_impl, + ) in _import_config_components( metric_exporter_names, "opentelemetry_metrics_exporter" ): # The metric exporter components may be push MetricExporter or pull exporters which @@ -283,7 +289,10 @@ def _import_exporters( else: raise RuntimeError(f"{exporter_name} is not a metric exporter") - for (exporter_name, exporter_impl,) in _import_config_components( + for ( + exporter_name, + exporter_impl, + ) in _import_config_components( log_exporter_names, "opentelemetry_logs_exporter" ): if issubclass(exporter_impl, LogExporter): @@ -360,9 +369,9 @@ def _initialize_components(auto_instrumentation_version): auto_resource = {} # populate version if using auto-instrumentation if auto_instrumentation_version: - auto_resource[ - ResourceAttributes.TELEMETRY_AUTO_VERSION - ] = auto_instrumentation_version + auto_resource[ResourceAttributes.TELEMETRY_AUTO_VERSION] = ( + auto_instrumentation_version + ) resource = Resource.create(auto_resource) _init_tracing( diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py index 8ba0dae6f2e..08835942971 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py @@ -202,22 +202,26 @@ def to_json(self, indent=4) -> str: "body": self.body, "severity_number": repr(self.severity_number), "severity_text": self.severity_text, - "attributes": dict(self.attributes) - if bool(self.attributes) - else None, + "attributes": ( + dict(self.attributes) if bool(self.attributes) else None + ), "dropped_attributes": self.dropped_attributes, "timestamp": ns_to_iso_str(self.timestamp), "observed_timestamp": ns_to_iso_str(self.observed_timestamp), - "trace_id": f"0x{format_trace_id(self.trace_id)}" - if self.trace_id is not None - else "", - "span_id": f"0x{format_span_id(self.span_id)}" - if self.span_id is not None - else "", + "trace_id": ( + f"0x{format_trace_id(self.trace_id)}" + if self.trace_id is not None + else "" + ), + "span_id": ( + f"0x{format_span_id(self.span_id)}" + if self.span_id is not None + else "" + ), "trace_flags": self.trace_flags, - "resource": repr(self.resource.attributes) - if self.resource - else "", + "resource": ( + repr(self.resource.attributes) if self.resource else "" + ), }, indent=indent, ) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py index 14546636a94..02dc2cf287a 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py @@ -247,27 +247,27 @@ def __init__( if typ is Counter: self._instrument_class_temporality[_Counter] = temporality elif typ is UpDownCounter: - self._instrument_class_temporality[ - _UpDownCounter - ] = temporality + self._instrument_class_temporality[_UpDownCounter] = ( + temporality + ) elif typ is Histogram: - self._instrument_class_temporality[ - _Histogram - ] = temporality + self._instrument_class_temporality[_Histogram] = ( + temporality + ) elif typ is Gauge: self._instrument_class_temporality[_Gauge] = temporality elif typ is ObservableCounter: - self._instrument_class_temporality[ - _ObservableCounter - ] = temporality + self._instrument_class_temporality[_ObservableCounter] = ( + temporality + ) elif typ is ObservableUpDownCounter: self._instrument_class_temporality[ _ObservableUpDownCounter ] = temporality elif typ is ObservableGauge: - self._instrument_class_temporality[ - _ObservableGauge - ] = temporality + self._instrument_class_temporality[_ObservableGauge] = ( + temporality + ) else: raise Exception(f"Invalid instrument class found {typ}") @@ -287,27 +287,27 @@ def __init__( if typ is Counter: self._instrument_class_aggregation[_Counter] = aggregation elif typ is UpDownCounter: - self._instrument_class_aggregation[ - _UpDownCounter - ] = aggregation + self._instrument_class_aggregation[_UpDownCounter] = ( + aggregation + ) elif typ is Histogram: - self._instrument_class_aggregation[ - _Histogram - ] = aggregation + self._instrument_class_aggregation[_Histogram] = ( + aggregation + ) elif typ is Gauge: self._instrument_class_aggregation[_Gauge] = aggregation elif typ is ObservableCounter: - self._instrument_class_aggregation[ - _ObservableCounter - ] = aggregation + self._instrument_class_aggregation[_ObservableCounter] = ( + aggregation + ) elif typ is ObservableUpDownCounter: self._instrument_class_aggregation[ _ObservableUpDownCounter ] = aggregation elif typ is ObservableGauge: - self._instrument_class_aggregation[ - _ObservableGauge - ] = aggregation + self._instrument_class_aggregation[_ObservableGauge] = ( + aggregation + ) else: raise Exception(f"Invalid instrument class found {typ}") @@ -398,13 +398,13 @@ def __init__( preferred_aggregation=preferred_aggregation, ) self._lock = RLock() - self._metrics_data: ( - "opentelemetry.sdk.metrics.export.MetricsData" - ) = None + self._metrics_data: "opentelemetry.sdk.metrics.export.MetricsData" = ( + None + ) def get_metrics_data( self, - ) -> ("opentelemetry.sdk.metrics.export.MetricsData"): + ) -> "opentelemetry.sdk.metrics.export.MetricsData": """Reads and returns current metrics from the SDK""" with self._lock: self.collect() @@ -551,9 +551,7 @@ def _shutdown(): self._shutdown_event.set() if self._daemon_thread: - self._daemon_thread.join( - timeout=(deadline_ns - time_ns()) / 10**9 - ) + self._daemon_thread.join(timeout=(deadline_ns - time_ns()) / 10**9) self._exporter.shutdown(timeout=(deadline_ns - time_ns()) / 10**6) def force_flush(self, timeout_millis: float = 10_000) -> bool: diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/metric_reader_storage.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/metric_reader_storage.py index 700ace87204..7fac6c6c105 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/metric_reader_storage.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/metric_reader_storage.py @@ -107,9 +107,9 @@ def _get_or_init_view_instrument_match( ), ) ) - self._instrument_view_instrument_matches[ - instrument - ] = view_instrument_matches + self._instrument_view_instrument_matches[instrument] = ( + view_instrument_matches + ) return view_instrument_matches @@ -136,9 +136,9 @@ def collect(self) -> Optional[MetricsData]: with self._lock: - instrumentation_scope_scope_metrics: ( - Dict[InstrumentationScope, ScopeMetrics] - ) = {} + instrumentation_scope_scope_metrics: Dict[ + InstrumentationScope, ScopeMetrics + ] = {} for ( instrument, diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py index 852b23f5002..20dd56862a0 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py @@ -335,10 +335,12 @@ def detect(self) -> "Resource": _runtime_version = ".".join( map( str, - sys.version_info[:3] - if sys.version_info.releaselevel == "final" - and not sys.version_info.serial - else sys.version_info, + ( + sys.version_info[:3] + if sys.version_info.releaselevel == "final" + and not sys.version_info.serial + else sys.version_info + ), ) ) _process_pid = os.getpid() diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py index c07f4f42c46..55a375315b4 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py @@ -485,9 +485,9 @@ def to_json(self, indent: int = 4): f_span = { "name": self._name, - "context": self._format_context(self._context) - if self._context - else None, + "context": ( + self._format_context(self._context) if self._context else None + ), "kind": str(self.kind), "parent_id": parent_id, "start_time": start_time, @@ -627,23 +627,29 @@ def __init__( self.max_span_attributes = self._from_env_if_absent( max_span_attributes, OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, - global_max_attributes - if global_max_attributes is not None - else _DEFAULT_OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, + ( + global_max_attributes + if global_max_attributes is not None + else _DEFAULT_OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT + ), ) self.max_event_attributes = self._from_env_if_absent( max_event_attributes, OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT, - global_max_attributes - if global_max_attributes is not None - else _DEFAULT_OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT, + ( + global_max_attributes + if global_max_attributes is not None + else _DEFAULT_OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT + ), ) self.max_link_attributes = self._from_env_if_absent( max_link_attributes, OTEL_LINK_ATTRIBUTE_COUNT_LIMIT, - global_max_attributes - if global_max_attributes is not None - else _DEFAULT_OTEL_LINK_ATTRIBUTE_COUNT_LIMIT, + ( + global_max_attributes + if global_max_attributes is not None + else _DEFAULT_OTEL_LINK_ATTRIBUTE_COUNT_LIMIT + ), ) # attribute length diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/util/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/util/__init__.py index c74ecd0c649..68f10ddc9e9 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/util/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/util/__init__.py @@ -34,9 +34,9 @@ def get_dict_as_key(labels): return tuple( sorted( map( - lambda kv: (kv[0], tuple(kv[1])) - if isinstance(kv[1], list) - else kv, + lambda kv: ( + (kv[0], tuple(kv[1])) if isinstance(kv[1], list) else kv + ), labels.items(), ) ) diff --git a/opentelemetry-sdk/tests/metrics/integration_test/test_cpu_time.py b/opentelemetry-sdk/tests/metrics/integration_test/test_cpu_time.py index 7b440c0332a..18b8cbdcea0 100644 --- a/opentelemetry-sdk/tests/metrics/integration_test/test_cpu_time.py +++ b/opentelemetry-sdk/tests/metrics/integration_test/test_cpu_time.py @@ -188,9 +188,9 @@ def cpu_time_callback( ) def test_cpu_time_generator(self): - def cpu_time_generator() -> Generator[ - Iterable[Observation], None, None - ]: + def cpu_time_generator() -> ( + Generator[Iterable[Observation], None, None] + ): options = yield while True: self.assertIsInstance(options, CallbackOptions) diff --git a/opentelemetry-sdk/tests/metrics/integration_test/test_explicit_bucket_histogram_aggregation.py b/opentelemetry-sdk/tests/metrics/integration_test/test_explicit_bucket_histogram_aggregation.py index 6db35fd4c0a..bdae2aad13e 100644 --- a/opentelemetry-sdk/tests/metrics/integration_test/test_explicit_bucket_histogram_aggregation.py +++ b/opentelemetry-sdk/tests/metrics/integration_test/test_explicit_bucket_histogram_aggregation.py @@ -193,9 +193,11 @@ def test_synchronous_cumulative_temporality(self): metric_data.bucket_counts, tuple( [ - 0 - if internal_index < 1 or internal_index > index + 1 - else 1 + ( + 0 + if internal_index < 1 or internal_index > index + 1 + else 1 + ) for internal_index in range(16) ] ), diff --git a/opentelemetry-sdk/tests/resources/test_resources.py b/opentelemetry-sdk/tests/resources/test_resources.py index da3f9469617..a0c6159010d 100644 --- a/opentelemetry-sdk/tests/resources/test_resources.py +++ b/opentelemetry-sdk/tests/resources/test_resources.py @@ -511,9 +511,9 @@ def test_invalid_key_value_pairs(self): def test_multiple_with_url_decode(self): detector = OTELResourceDetector() - environ[ - OTEL_RESOURCE_ATTRIBUTES - ] = "key=value%20test%0A, key2=value+%202" + environ[OTEL_RESOURCE_ATTRIBUTES] = ( + "key=value%20test%0A, key2=value+%202" + ) self.assertEqual( detector.detect(), Resource({"key": "value test\n", "key2": "value+ 2"}), diff --git a/shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_span.py b/shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_span.py index f3ff804c6f2..2012035247a 100644 --- a/shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_span.py +++ b/shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_span.py @@ -97,13 +97,13 @@ def add_message_event(self, message_event: MessageEvent): ], } if message_event.uncompressed_size_bytes is not None: - attrs[ - _MESSAGE_EVENT_ATTRIBUTE_KEY_SIZE_UNCOMPRESSED - ] = message_event.uncompressed_size_bytes + attrs[_MESSAGE_EVENT_ATTRIBUTE_KEY_SIZE_UNCOMPRESSED] = ( + message_event.uncompressed_size_bytes + ) if message_event.compressed_size_bytes is not None: - attrs[ - _MESSAGE_EVENT_ATTRIBUTE_KEY_SIZE_COMPRESSED - ] = message_event.compressed_size_bytes + attrs[_MESSAGE_EVENT_ATTRIBUTE_KEY_SIZE_COMPRESSED] = ( + message_event.compressed_size_bytes + ) timestamp = _opencensus_time_to_nanos(message_event.timestamp) self._self_otel_span.add_event( diff --git a/shim/opentelemetry-opentracing-shim/tests/test_shim.py b/shim/opentelemetry-opentracing-shim/tests/test_shim.py index 99394ad2169..b75915d20fe 100644 --- a/shim/opentelemetry-opentracing-shim/tests/test_shim.py +++ b/shim/opentelemetry-opentracing-shim/tests/test_shim.py @@ -302,7 +302,7 @@ def test_parent_child_implicit(self): # Verify parent span becomes the active span again. self.assertEqual( self.shim.active_span.context.unwrap(), - parent.span.context.unwrap() + parent.span.context.unwrap(), # TODO: Check equality of the spans themselves rather than # their context once the SpanShim reconstruction problem has # been addressed (see previous TODO). From fbbf5b565032e2d9826dd8e631733c0cd255513f Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Tue, 23 Apr 2024 10:27:19 -0500 Subject: [PATCH 7/9] Revert modifications to Apache license (#3870) Fixes #3869 Co-authored-by: Leighton Chen --- exporter/opentelemetry-exporter-opencensus/LICENSE | 2 +- exporter/opentelemetry-exporter-otlp-proto-common/LICENSE | 2 +- exporter/opentelemetry-exporter-otlp-proto-grpc/LICENSE | 2 +- exporter/opentelemetry-exporter-otlp-proto-http/LICENSE | 2 +- exporter/opentelemetry-exporter-otlp/LICENSE | 2 +- exporter/opentelemetry-exporter-prometheus/LICENSE | 2 +- exporter/opentelemetry-exporter-zipkin-json/LICENSE | 2 +- exporter/opentelemetry-exporter-zipkin-proto-http/LICENSE | 2 +- exporter/opentelemetry-exporter-zipkin/LICENSE | 2 +- opentelemetry-api/LICENSE | 2 +- opentelemetry-proto/LICENSE | 2 +- opentelemetry-sdk/LICENSE | 2 +- opentelemetry-semantic-conventions/LICENSE | 2 +- propagator/opentelemetry-propagator-b3/LICENSE | 2 +- propagator/opentelemetry-propagator-jaeger/LICENSE | 2 +- shim/opentelemetry-opencensus-shim/LICENSE | 2 +- shim/opentelemetry-opentracing-shim/LICENSE | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/exporter/opentelemetry-exporter-opencensus/LICENSE b/exporter/opentelemetry-exporter-opencensus/LICENSE index 1ef7dad2c5c..261eeb9e9f8 100644 --- a/exporter/opentelemetry-exporter-opencensus/LICENSE +++ b/exporter/opentelemetry-exporter-opencensus/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The OpenTelemetry Authors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/LICENSE b/exporter/opentelemetry-exporter-otlp-proto-common/LICENSE index 1ef7dad2c5c..261eeb9e9f8 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/LICENSE +++ b/exporter/opentelemetry-exporter-otlp-proto-common/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The OpenTelemetry Authors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/LICENSE b/exporter/opentelemetry-exporter-otlp-proto-grpc/LICENSE index 1ef7dad2c5c..261eeb9e9f8 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/LICENSE +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The OpenTelemetry Authors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/LICENSE b/exporter/opentelemetry-exporter-otlp-proto-http/LICENSE index 1ef7dad2c5c..261eeb9e9f8 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/LICENSE +++ b/exporter/opentelemetry-exporter-otlp-proto-http/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The OpenTelemetry Authors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/exporter/opentelemetry-exporter-otlp/LICENSE b/exporter/opentelemetry-exporter-otlp/LICENSE index 1ef7dad2c5c..261eeb9e9f8 100644 --- a/exporter/opentelemetry-exporter-otlp/LICENSE +++ b/exporter/opentelemetry-exporter-otlp/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The OpenTelemetry Authors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/exporter/opentelemetry-exporter-prometheus/LICENSE b/exporter/opentelemetry-exporter-prometheus/LICENSE index 1ef7dad2c5c..261eeb9e9f8 100644 --- a/exporter/opentelemetry-exporter-prometheus/LICENSE +++ b/exporter/opentelemetry-exporter-prometheus/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The OpenTelemetry Authors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/exporter/opentelemetry-exporter-zipkin-json/LICENSE b/exporter/opentelemetry-exporter-zipkin-json/LICENSE index 1ef7dad2c5c..261eeb9e9f8 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/LICENSE +++ b/exporter/opentelemetry-exporter-zipkin-json/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The OpenTelemetry Authors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/LICENSE b/exporter/opentelemetry-exporter-zipkin-proto-http/LICENSE index 1ef7dad2c5c..261eeb9e9f8 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/LICENSE +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The OpenTelemetry Authors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/exporter/opentelemetry-exporter-zipkin/LICENSE b/exporter/opentelemetry-exporter-zipkin/LICENSE index 1ef7dad2c5c..261eeb9e9f8 100644 --- a/exporter/opentelemetry-exporter-zipkin/LICENSE +++ b/exporter/opentelemetry-exporter-zipkin/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The OpenTelemetry Authors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/opentelemetry-api/LICENSE b/opentelemetry-api/LICENSE index 1ef7dad2c5c..261eeb9e9f8 100644 --- a/opentelemetry-api/LICENSE +++ b/opentelemetry-api/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The OpenTelemetry Authors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/opentelemetry-proto/LICENSE b/opentelemetry-proto/LICENSE index 1ef7dad2c5c..261eeb9e9f8 100644 --- a/opentelemetry-proto/LICENSE +++ b/opentelemetry-proto/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The OpenTelemetry Authors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/opentelemetry-sdk/LICENSE b/opentelemetry-sdk/LICENSE index 1ef7dad2c5c..261eeb9e9f8 100644 --- a/opentelemetry-sdk/LICENSE +++ b/opentelemetry-sdk/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The OpenTelemetry Authors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/opentelemetry-semantic-conventions/LICENSE b/opentelemetry-semantic-conventions/LICENSE index 1ef7dad2c5c..261eeb9e9f8 100644 --- a/opentelemetry-semantic-conventions/LICENSE +++ b/opentelemetry-semantic-conventions/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The OpenTelemetry Authors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/propagator/opentelemetry-propagator-b3/LICENSE b/propagator/opentelemetry-propagator-b3/LICENSE index 1ef7dad2c5c..261eeb9e9f8 100644 --- a/propagator/opentelemetry-propagator-b3/LICENSE +++ b/propagator/opentelemetry-propagator-b3/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The OpenTelemetry Authors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/propagator/opentelemetry-propagator-jaeger/LICENSE b/propagator/opentelemetry-propagator-jaeger/LICENSE index 1ef7dad2c5c..261eeb9e9f8 100644 --- a/propagator/opentelemetry-propagator-jaeger/LICENSE +++ b/propagator/opentelemetry-propagator-jaeger/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The OpenTelemetry Authors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/shim/opentelemetry-opencensus-shim/LICENSE b/shim/opentelemetry-opencensus-shim/LICENSE index 1ef7dad2c5c..261eeb9e9f8 100644 --- a/shim/opentelemetry-opencensus-shim/LICENSE +++ b/shim/opentelemetry-opencensus-shim/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The OpenTelemetry Authors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/shim/opentelemetry-opentracing-shim/LICENSE b/shim/opentelemetry-opentracing-shim/LICENSE index 1ef7dad2c5c..261eeb9e9f8 100644 --- a/shim/opentelemetry-opentracing-shim/LICENSE +++ b/shim/opentelemetry-opentracing-shim/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The OpenTelemetry Authors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From d213e02941039d4383abc3608b75404ce84725b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Apr 2024 08:45:39 -0700 Subject: [PATCH 8/9] Bump gunicorn in /docs/examples/fork-process-model/flask-gunicorn (#3855) --- .../examples/fork-process-model/flask-gunicorn/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/fork-process-model/flask-gunicorn/requirements.txt b/docs/examples/fork-process-model/flask-gunicorn/requirements.txt index 1c04945a7f5..1a0c4b6cea8 100644 --- a/docs/examples/fork-process-model/flask-gunicorn/requirements.txt +++ b/docs/examples/fork-process-model/flask-gunicorn/requirements.txt @@ -2,7 +2,7 @@ click==8.1.7 Flask==2.3.3 googleapis-common-protos==1.52.0 grpcio==1.56.0 -gunicorn==20.0.4 +gunicorn==22.0.0 itsdangerous==2.1.2 Jinja2==3.1.3 MarkupSafe==2.1.3 From 0f39508dfab1223e651b6e6215ece849360e9d61 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Tue, 23 Apr 2024 15:30:17 -0500 Subject: [PATCH 9/9] Rename more requirements files --- dev-requirements.txt => dev-requirements | 0 docs-requirements.txt => docs-requirements | 0 .../metrics/prometheus-grafana/{requirements.txt => requirements} | 0 docs/examples/metrics/reader/{requirements.txt => requirements} | 0 docs/examples/metrics/views/{requirements.txt => requirements} | 0 docs/examples/opencensus-shim/{requirements.txt => requirements} | 0 docs/examples/opentracing/{requirements.txt => requirements} | 0 .../{test-requirements.txt => test-requirements} | 0 .../{test-requirements-0.txt => test-requirements-0} | 0 .../{test-requirements-1.txt => test-requirements-1} | 0 .../{test-requirements-0.txt => test-requirements-0} | 0 .../{test-requirements-1.txt => test-requirements-1} | 0 .../{test-requirements-0.txt => test-requirements-0} | 0 .../{test-requirements-1.txt => test-requirements-1} | 0 .../{test-requirements.txt => test-requirements} | 0 .../{test-requirements.txt => test-requirements} | 0 .../{test-requirements.txt => test-requirements} | 0 .../{test-requirements.txt => test-requirements} | 0 .../{test-requirements.txt => test-requirements} | 0 opentelemetry-api/{test-requirements.txt => test-requirements} | 0 .../{test-requirements-0.txt => test-requirements-0} | 0 .../{test-requirements-1.txt => test-requirements-1} | 0 .../{test-requirements.txt => test-requirements} | 0 .../{test-requirements.txt => test-requirements} | 0 .../{test-requirements.txt => test-requirements} | 0 .../{test-requirements.txt => test-requirements} | 0 26 files changed, 0 insertions(+), 0 deletions(-) rename dev-requirements.txt => dev-requirements (100%) rename docs-requirements.txt => docs-requirements (100%) rename docs/examples/metrics/prometheus-grafana/{requirements.txt => requirements} (100%) rename docs/examples/metrics/reader/{requirements.txt => requirements} (100%) rename docs/examples/metrics/views/{requirements.txt => requirements} (100%) rename docs/examples/opencensus-shim/{requirements.txt => requirements} (100%) rename docs/examples/opentracing/{requirements.txt => requirements} (100%) rename exporter/opentelemetry-exporter-opencensus/{test-requirements.txt => test-requirements} (100%) rename exporter/opentelemetry-exporter-otlp-proto-common/{test-requirements-0.txt => test-requirements-0} (100%) rename exporter/opentelemetry-exporter-otlp-proto-common/{test-requirements-1.txt => test-requirements-1} (100%) rename exporter/opentelemetry-exporter-otlp-proto-grpc/{test-requirements-0.txt => test-requirements-0} (100%) rename exporter/opentelemetry-exporter-otlp-proto-grpc/{test-requirements-1.txt => test-requirements-1} (100%) rename exporter/opentelemetry-exporter-otlp-proto-http/{test-requirements-0.txt => test-requirements-0} (100%) rename exporter/opentelemetry-exporter-otlp-proto-http/{test-requirements-1.txt => test-requirements-1} (100%) rename exporter/opentelemetry-exporter-otlp/{test-requirements.txt => test-requirements} (100%) rename exporter/opentelemetry-exporter-prometheus/{test-requirements.txt => test-requirements} (100%) rename exporter/opentelemetry-exporter-zipkin-json/{test-requirements.txt => test-requirements} (100%) rename exporter/opentelemetry-exporter-zipkin-proto-http/{test-requirements.txt => test-requirements} (100%) rename exporter/opentelemetry-exporter-zipkin/{test-requirements.txt => test-requirements} (100%) rename opentelemetry-api/{test-requirements.txt => test-requirements} (100%) rename opentelemetry-proto/{test-requirements-0.txt => test-requirements-0} (100%) rename opentelemetry-proto/{test-requirements-1.txt => test-requirements-1} (100%) rename opentelemetry-semantic-conventions/{test-requirements.txt => test-requirements} (100%) rename shim/opentelemetry-opencensus-shim/{test-requirements.txt => test-requirements} (100%) rename shim/opentelemetry-opentracing-shim/{test-requirements.txt => test-requirements} (100%) rename tests/opentelemetry-test-utils/{test-requirements.txt => test-requirements} (100%) diff --git a/dev-requirements.txt b/dev-requirements similarity index 100% rename from dev-requirements.txt rename to dev-requirements diff --git a/docs-requirements.txt b/docs-requirements similarity index 100% rename from docs-requirements.txt rename to docs-requirements diff --git a/docs/examples/metrics/prometheus-grafana/requirements.txt b/docs/examples/metrics/prometheus-grafana/requirements similarity index 100% rename from docs/examples/metrics/prometheus-grafana/requirements.txt rename to docs/examples/metrics/prometheus-grafana/requirements diff --git a/docs/examples/metrics/reader/requirements.txt b/docs/examples/metrics/reader/requirements similarity index 100% rename from docs/examples/metrics/reader/requirements.txt rename to docs/examples/metrics/reader/requirements diff --git a/docs/examples/metrics/views/requirements.txt b/docs/examples/metrics/views/requirements similarity index 100% rename from docs/examples/metrics/views/requirements.txt rename to docs/examples/metrics/views/requirements diff --git a/docs/examples/opencensus-shim/requirements.txt b/docs/examples/opencensus-shim/requirements similarity index 100% rename from docs/examples/opencensus-shim/requirements.txt rename to docs/examples/opencensus-shim/requirements diff --git a/docs/examples/opentracing/requirements.txt b/docs/examples/opentracing/requirements similarity index 100% rename from docs/examples/opentracing/requirements.txt rename to docs/examples/opentracing/requirements diff --git a/exporter/opentelemetry-exporter-opencensus/test-requirements.txt b/exporter/opentelemetry-exporter-opencensus/test-requirements similarity index 100% rename from exporter/opentelemetry-exporter-opencensus/test-requirements.txt rename to exporter/opentelemetry-exporter-opencensus/test-requirements diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-0.txt b/exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-0 similarity index 100% rename from exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-0.txt rename to exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-0 diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-1.txt b/exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-1 similarity index 100% rename from exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-1.txt rename to exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-1 diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-0.txt b/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-0 similarity index 100% rename from exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-0.txt rename to exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-0 diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-1.txt b/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-1 similarity index 100% rename from exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-1.txt rename to exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-1 diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-0.txt b/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-0 similarity index 100% rename from exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-0.txt rename to exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-0 diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-1.txt b/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-1 similarity index 100% rename from exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-1.txt rename to exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-1 diff --git a/exporter/opentelemetry-exporter-otlp/test-requirements.txt b/exporter/opentelemetry-exporter-otlp/test-requirements similarity index 100% rename from exporter/opentelemetry-exporter-otlp/test-requirements.txt rename to exporter/opentelemetry-exporter-otlp/test-requirements diff --git a/exporter/opentelemetry-exporter-prometheus/test-requirements.txt b/exporter/opentelemetry-exporter-prometheus/test-requirements similarity index 100% rename from exporter/opentelemetry-exporter-prometheus/test-requirements.txt rename to exporter/opentelemetry-exporter-prometheus/test-requirements diff --git a/exporter/opentelemetry-exporter-zipkin-json/test-requirements.txt b/exporter/opentelemetry-exporter-zipkin-json/test-requirements similarity index 100% rename from exporter/opentelemetry-exporter-zipkin-json/test-requirements.txt rename to exporter/opentelemetry-exporter-zipkin-json/test-requirements diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/test-requirements.txt b/exporter/opentelemetry-exporter-zipkin-proto-http/test-requirements similarity index 100% rename from exporter/opentelemetry-exporter-zipkin-proto-http/test-requirements.txt rename to exporter/opentelemetry-exporter-zipkin-proto-http/test-requirements diff --git a/exporter/opentelemetry-exporter-zipkin/test-requirements.txt b/exporter/opentelemetry-exporter-zipkin/test-requirements similarity index 100% rename from exporter/opentelemetry-exporter-zipkin/test-requirements.txt rename to exporter/opentelemetry-exporter-zipkin/test-requirements diff --git a/opentelemetry-api/test-requirements.txt b/opentelemetry-api/test-requirements similarity index 100% rename from opentelemetry-api/test-requirements.txt rename to opentelemetry-api/test-requirements diff --git a/opentelemetry-proto/test-requirements-0.txt b/opentelemetry-proto/test-requirements-0 similarity index 100% rename from opentelemetry-proto/test-requirements-0.txt rename to opentelemetry-proto/test-requirements-0 diff --git a/opentelemetry-proto/test-requirements-1.txt b/opentelemetry-proto/test-requirements-1 similarity index 100% rename from opentelemetry-proto/test-requirements-1.txt rename to opentelemetry-proto/test-requirements-1 diff --git a/opentelemetry-semantic-conventions/test-requirements.txt b/opentelemetry-semantic-conventions/test-requirements similarity index 100% rename from opentelemetry-semantic-conventions/test-requirements.txt rename to opentelemetry-semantic-conventions/test-requirements diff --git a/shim/opentelemetry-opencensus-shim/test-requirements.txt b/shim/opentelemetry-opencensus-shim/test-requirements similarity index 100% rename from shim/opentelemetry-opencensus-shim/test-requirements.txt rename to shim/opentelemetry-opencensus-shim/test-requirements diff --git a/shim/opentelemetry-opentracing-shim/test-requirements.txt b/shim/opentelemetry-opentracing-shim/test-requirements similarity index 100% rename from shim/opentelemetry-opentracing-shim/test-requirements.txt rename to shim/opentelemetry-opentracing-shim/test-requirements diff --git a/tests/opentelemetry-test-utils/test-requirements.txt b/tests/opentelemetry-test-utils/test-requirements similarity index 100% rename from tests/opentelemetry-test-utils/test-requirements.txt rename to tests/opentelemetry-test-utils/test-requirements