From 7bbd5e9c5b551f0cecd746a505a655346a15fe84 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 15:52:51 -0500 Subject: [PATCH 01/38] link: common amongst other instrumentation and can be abstracted Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8119304875..08b222410d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -271,7 +271,7 @@ Below is a checklist of things to be mindful of when implementing a new instrume - Supports auto-instrumentation - Add an entry point (ex. ) - Run `python scripts/generate_instrumentation_bootstrap.py` after adding a new instrumentation package. -- Functionality that is common amongst other instrumentation and can be abstracted [here](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/opentelemetry-instrumentation/src/opentelemetry/instrumentation) +- Functionality that is [common amongst other instrumentation and can be abstracted](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/opentelemetry-instrumentation/src/opentelemetry/instrumentation) - Request/response [hooks](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/408) for http instrumentations - `suppress_instrumentation` functionality - ex. From 9d9470dc53ba2f6c02eaa5ed2ccc373d401ff139 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 15:53:01 -0500 Subject: [PATCH 02/38] link: entry template Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 08b222410d..015f93e1ff 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -290,7 +290,7 @@ Below is a checklist of things to be mindful of when implementing a new instrume - ex. - Most of the instrumentations have the same version. If you are going to develop a new instrumentation it would probably have `X.Y.dev` version and depends on `opentelemetry-instrumentation` and `opentelemetry-semantic-conventions` for a [compatible version](https://peps.python.org/pep-0440/#compatible-release). That means that you may need to install the instrumentation dependencies from this repo and the core repo from git. - Documentation - - When adding a new instrumentation remember to add an entry in `docs/instrumentation/` named `/.rst` to have the instrumentation documentation referenced from the index. You can use the entry template available [here](./_template/autodoc_entry.rst) + - When adding a new instrumentation remember to add an entry in `docs/instrumentation/` named `/.rst` to have the instrumentation documentation referenced from the index. You can use the [entry template](./_template/autodoc_entry.rst) - Testing - When adding a new instrumentation remember to update `tox.ini` adding appropriate rules in `envlist`, `command_pre` and `commands` sections From 0bd00744a3333be02375eb258a1ef0bfed7612be Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 15:52:32 -0500 Subject: [PATCH 03/38] link: semantic conventions Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 015f93e1ff..b31aace3cb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -263,7 +263,7 @@ The continuous integration overrides that environment variable with as per the c Below is a checklist of things to be mindful of when implementing a new instrumentation or working on a specific instrumentation. It is one of our goals as a community to keep the implementation specific details of instrumentations as similar across the board as possible for ease of testing and feature parity. It is also good to abstract as much common functionality as possible. - Follow semantic conventions - - The instrumentation should follow the semantic conventions defined [here](https://github.com/open-telemetry/semantic-conventions/tree/main/docs). + - The instrumentation should follow the [semantic conventions](https://github.com/open-telemetry/semantic-conventions/tree/main/docs). - To ensure consistency, we encourage contributions that align with [STABLE](https://opentelemetry.io/docs/specs/otel/document-status/#lifecycle-status) semantic conventions if available. This approach helps us avoid potential confusion and reduces the need to support multiple outdated versions of semantic conventions. However, we are still open to considering exceptional cases where changes are well justified. - Contributions related to outdated HTTP semantic conventions (conventions prior to becoming [stable](https://github.com/open-telemetry/semantic-conventions/tree/v1.23.0)) will likely be discouraged, as they increase complexity and the potential for misconceptions. - Contains a name that is not already claimed in [Pypi](https://pypi.org/). Contact a maintainer, bring the issue up in the weekly Python SIG or create a ticket in Pypi if a desired name has already been taken. From 5873160fdb57ce37467384542b5cf04a8e5602bb Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 15:52:18 -0500 Subject: [PATCH 04/38] link: the configuration Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b31aace3cb..bdfdbb8d58 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -248,7 +248,7 @@ Some of the tox targets install packages from the [OpenTelemetry Python Core Rep CORE_REPO_SHA=c49ad57bfe35cfc69bfa863d74058ca9bec55fc3 tox ``` -The continuous integration overrides that environment variable with as per the configuration [here](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/.github/workflows/test_0.yml#L14). +The continuous integration overrides that environment variable with as per [the configuration](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/.github/workflows/test_0.yml#L14). ## Style Guide From bfa3126d20f5eed4dd8df0b929c4c9b2b4b19bc0 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 19:58:31 -0500 Subject: [PATCH 05/38] spelling: attributes Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- instrumentation/opentelemetry-instrumentation-falcon/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-falcon/README.rst b/instrumentation/opentelemetry-instrumentation-falcon/README.rst index 5f18ba95e1..41af49a63c 100644 --- a/instrumentation/opentelemetry-instrumentation-falcon/README.rst +++ b/instrumentation/opentelemetry-instrumentation-falcon/README.rst @@ -43,7 +43,7 @@ For example, export OTEL_PYTHON_FALCON_TRACED_REQUEST_ATTRS='query_string,uri_template' -will extract path_info and content_type attributes from every traced request and add them as span attritbues. +will extract path_info and content_type attributes from every traced request and add them as span attributes. Falcon Request object reference: https://falcon.readthedocs.io/en/stable/api/request_and_response.html#id1 From 980c328ce28a14520e523ca6afb3a4799875f003 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 15:53:08 -0500 Subject: [PATCH 06/38] spelling: cannot Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../src/opentelemetry/instrumentation/django/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py index e5851a17c2..f23b9e91a6 100644 --- a/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py @@ -380,7 +380,7 @@ def _instrument(self, **kwargs): _DjangoMiddleware._active_request_counter = ( create_http_server_active_requests(meter) ) - # This can not be solved, but is an inherent problem of this approach: + # This cannot be solved, but is an inherent problem of this approach: # the order of middleware entries matters, and here you have no control # on that: # https://docs.djangoproject.com/en/3.0/topics/http/middleware/#activating-middleware From 0d87e30dcb0f0125b434318e12c867e7bcfa08b4 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 15:53:17 -0500 Subject: [PATCH 07/38] spelling: case-insensitive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CHANGELOG.md | 4 ++-- .../opentelemetry-instrumentation-asgi/tests/test_getter.py | 6 +++--- .../src/opentelemetry/instrumentation/tornado/__init__.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a4de30776..8e91082ca7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -736,7 +736,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#1377](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1377)) - `opentelemetry-instrumentation-asgi` Fix keys() in class ASGIGetter so it decodes the keys before returning them. ([#1333](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1333)) -- `opentelemetry-instrumentation-asgi` Make ASGIGetter.get() compare all keys in a case insensitive manner. +- `opentelemetry-instrumentation-asgi` Make ASGIGetter.get() compare all keys in a case-insensitive manner. ([#1333](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1333)) - Use resp.text instead of resp.body for Falcon 3 to avoid a deprecation warning. ([#1412](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1412)) @@ -1397,7 +1397,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Remove `component` span attribute in instrumentations. `opentelemetry-instrumentation-aiopg`, `opentelemetry-instrumentation-dbapi` Remove unused `database_type` parameter from `trace_integration` function. ([#301](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/301)) -- `opentelemetry-instrumentation-asgi` Return header values using case insensitive keys +- `opentelemetry-instrumentation-asgi` Return header values using case-insensitive keys ([#308](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/308)) - Remove metrics from all instrumentations ([#312](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/312)) diff --git a/instrumentation/opentelemetry-instrumentation-asgi/tests/test_getter.py b/instrumentation/opentelemetry-instrumentation-asgi/tests/test_getter.py index 3f76e0e5ce..88bc537aaa 100644 --- a/instrumentation/opentelemetry-instrumentation-asgi/tests/test_getter.py +++ b/instrumentation/opentelemetry-instrumentation-asgi/tests/test_getter.py @@ -37,17 +37,17 @@ def test_get_(self): self.assertEqual( getter.get(carrier, "Test-Key"), expected_val, - "Should be case insensitive", + "Should be case-insensitive", ) self.assertEqual( getter.get(carrier, "test-key"), expected_val, - "Should be case insensitive", + "Should be case-insensitive", ) self.assertEqual( getter.get(carrier, "TEST-KEY"), expected_val, - "Should be case insensitive", + "Should be case-insensitive", ) def test_keys_empty_carrier(self): diff --git a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py index 3a19450433..096c8253f3 100644 --- a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py @@ -115,7 +115,7 @@ def client_response_hook(span, future): will extract ``content-type`` and ``custom_request_header`` from request headers and add them as span attributes. It is recommended that you should give the correct names of the headers to be captured in the environment variable. -Request header names in tornado are case insensitive. So, giving header name as ``CUStomHeader`` in environment variable will be able capture header with name ``customheader``. +Request header names in tornado are case-insensitive. So, giving header name as ``CUStomHeader`` in environment variable will be able capture header with name ``customheader``. The name of the added span attribute will follow the format ``http.request.header.`` where ```` being the normalized HTTP header name (lowercase, with - characters replaced by _ ). The value of the attribute will be single item list containing all the header values. @@ -137,7 +137,7 @@ def client_response_hook(span, future): will extract ``content-type`` and ``custom_response_header`` from response headers and add them as span attributes. It is recommended that you should give the correct names of the headers to be captured in the environment variable. -Response header names captured in tornado are case insensitive. So, giving header name as ``CUStomHeader`` in environment variable will be able capture header with name ``customheader``. +Response header names captured in tornado are case-insensitive. So, giving header name as ``CUStomHeader`` in environment variable will be able capture header with name ``customheader``. The name of the added span attribute will follow the format ``http.response.header.`` where ```` being the normalized HTTP header name (lowercase, with - characters replaced by _ ). The value of the attribute will be single item list containing all the header values. From 7b4b2ff476aab87cd770caf192b6128385d68225 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 15:53:29 -0500 Subject: [PATCH 08/38] spelling: case-sensitive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../src/opentelemetry/instrumentation/_semconv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/_semconv.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/_semconv.py index 091c876535..fbad491cd8 100644 --- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/_semconv.py +++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/_semconv.py @@ -245,7 +245,7 @@ def _set_http_method(result, original, normalized, sem_conv_opt_in_mode): original = original.strip() normalized = normalized.strip() # See https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md#common-attributes - # Method is case sensitive. "http.request.method_original" should not be sanitized or automatically capitalized. + # Method is case-sensitive. "http.request.method_original" should not be sanitized or automatically capitalized. if original != normalized and _report_new(sem_conv_opt_in_mode): set_string_attribute(result, HTTP_REQUEST_METHOD_ORIGINAL, original) From c9bd8f937cfed55ce5516624c638ceaf416a8642 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 20:06:17 -0500 Subject: [PATCH 09/38] spelling: clobbers Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../opentelemetry/exporter/prometheus_remote_write/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporter/opentelemetry-exporter-prometheus-remote-write/src/opentelemetry/exporter/prometheus_remote_write/__init__.py b/exporter/opentelemetry-exporter-prometheus-remote-write/src/opentelemetry/exporter/prometheus_remote_write/__init__.py index cfb1d9ea75..13d40d833c 100644 --- a/exporter/opentelemetry-exporter-prometheus-remote-write/src/opentelemetry/exporter/prometheus_remote_write/__init__.py +++ b/exporter/opentelemetry-exporter-prometheus-remote-write/src/opentelemetry/exporter/prometheus_remote_write/__init__.py @@ -296,7 +296,7 @@ def _sanitize_string(string: str, type_: str) -> str: raise TypeError(f"Unsupported string type: {type_}") # Remove consecutive underscores - # TODO: Unfortunately this clobbbers __name__ + # TODO: Unfortunately this clobbers __name__ # sanitized = UNDERSCORE_REGEX.sub("_",sanitized) return sanitized From 6a99d63823d5ff7397593bac0448cc6ca1cc597b Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 16:04:59 -0500 Subject: [PATCH 10/38] spelling: conditional Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../tests/test_starlette_instrumentation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-starlette/tests/test_starlette_instrumentation.py b/instrumentation/opentelemetry-instrumentation-starlette/tests/test_starlette_instrumentation.py index 3f9f1c7b0f..af550173ef 100644 --- a/instrumentation/opentelemetry-instrumentation-starlette/tests/test_starlette_instrumentation.py +++ b/instrumentation/opentelemetry-instrumentation-starlette/tests/test_starlette_instrumentation.py @@ -584,7 +584,7 @@ def test_instrumentation(self): self.assertIs(original, should_be_original) -class TestConditonalServerSpanCreation(TestStarletteManualInstrumentation): +class TestConditionalServerSpanCreation(TestStarletteManualInstrumentation): def test_mark_span_internal_in_presence_of_another_span(self): tracer = get_tracer(__name__) with tracer.start_as_current_span( From 1d2805cbe16b80f4b98c0284276723760ef2b01a Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 16:05:16 -0500 Subject: [PATCH 11/38] spelling: convenience Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../tests/test_pymemcache.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/tests/test_pymemcache.py b/instrumentation/opentelemetry-instrumentation-pymemcache/tests/test_pymemcache.py index f888009017..1f2b2c2d67 100644 --- a/instrumentation/opentelemetry-instrumentation-pymemcache/tests/test_pymemcache.py +++ b/instrumentation/opentelemetry-instrumentation-pymemcache/tests/test_pymemcache.py @@ -140,7 +140,7 @@ def test_get_multi_none_found(self): def test_set_multi_success(self): client = self.make_client([b"STORED\r\n"]) - # Alias for set_many, a convienance function that calls set for every key + # Alias for set_many, a convenience function that calls set for every key result = client.set_multi({b"key": b"value"}, noreply=False) spans = self.memory_exporter.get_finished_spans() @@ -206,7 +206,7 @@ def test_add_stored(self): def test_delete_many_found(self): client = self.make_client([b"STORED\r", b"\n", b"DELETED\r\n"]) result = client.add(b"key", b"value", noreply=False) - # a convienance function that calls delete for every key + # a convenience function that calls delete for every key result = client.delete_many([b"key"], noreply=False) self.assertTrue(result) @@ -223,7 +223,7 @@ def test_delete_many_found(self): def test_set_many_success(self): client = self.make_client([b"STORED\r\n"]) - # a convienance function that calls set for every key + # a convenience function that calls set for every key result = client.set_many({b"key": b"value"}, noreply=False) spans = self.memory_exporter.get_finished_spans() From 397131e9cee7cde3017380f59c427e57c1beec7a Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 16:08:48 -0500 Subject: [PATCH 12/38] spelling: disposed Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../tests/test_sqlalchemy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py index 27a253decb..42a6670eb9 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py @@ -421,7 +421,7 @@ def test_no_op_tracer_provider(self): spans = self.memory_exporter.get_finished_spans() self.assertEqual(len(spans), 0) - def test_no_memory_leakage_if_engine_diposed(self): + def test_no_memory_leakage_if_engine_disposed(self): SQLAlchemyInstrumentor().instrument() import gc import weakref From 47f9ed1628b561d75139ca2fbbf5aec1164611cd Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:06:02 -0500 Subject: [PATCH 13/38] spelling: excluded Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../opentelemetry-instrumentation-flask/tests/test_automatic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-flask/tests/test_automatic.py b/instrumentation/opentelemetry-instrumentation-flask/tests/test_automatic.py index 16d299085d..99ce4c3825 100644 --- a/instrumentation/opentelemetry-instrumentation-flask/tests/test_automatic.py +++ b/instrumentation/opentelemetry-instrumentation-flask/tests/test_automatic.py @@ -60,7 +60,7 @@ def test_uninstrument(self): span_list = self.memory_exporter.get_finished_spans() self.assertEqual(len(span_list), 1) - def test_exluded_urls_explicit(self): + def test_excluded_urls_explicit(self): FlaskInstrumentor().uninstrument() FlaskInstrumentor().instrument(excluded_urls="/hello/456") From 0d5b0d1203c04b54fc4ffd87444a627127e7d7e9 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 16:09:41 -0500 Subject: [PATCH 14/38] spelling: execution Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../src/opentelemetry/instrumentation/tornado/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py index 096c8253f3..948f13086a 100644 --- a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py @@ -222,7 +222,7 @@ def _instrument(self, **kwargs): We don't patch RequestHandler._execute as it causes some issues with contextvars based context. Mainly the context fails to detach from within RequestHandler.on_finish() if it is attached inside RequestHandler._execute. Same issue plagues RequestHandler.initialize. RequestHandler.prepare works - perfectly on the other hand as it executes in the same context as on_finish and log_exection which + perfectly on the other hand as it executes in the same context as on_finish and log_execution which are patched to finish a span after a request is served. However, we cannot just patch RequestHandler's prepare method because it is supposed to be overridden From d08f8274fb9d1ef525a2dcee1ac568190a4bff59 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:06:09 -0500 Subject: [PATCH 15/38] spelling: explicit Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../tests/test_ot_trace_propagator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/propagator/opentelemetry-propagator-ot-trace/tests/test_ot_trace_propagator.py b/propagator/opentelemetry-propagator-ot-trace/tests/test_ot_trace_propagator.py index 9a4009bf2d..450e29c763 100644 --- a/propagator/opentelemetry-propagator-ot-trace/tests/test_ot_trace_propagator.py +++ b/propagator/opentelemetry-propagator-ot-trace/tests/test_ot_trace_propagator.py @@ -275,7 +275,7 @@ def test_extract_trace_id_span_id_sampled_false(self): get_current_span().get_span_context().trace_flags, TraceFlags ) - def test_extract_invalid_trace_header_to_explict_ctx(self): + def test_extract_invalid_trace_header_to_explicit_ctx(self): invalid_headers = [ ("abc123!", "e457b5a2e4d86bd1"), # malformed trace id ("64fe8b2a57d3eff7", "abc123!"), # malformed span id From f7da9a5058b5e4203425686f6a0b12743b7f7840 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:06:17 -0500 Subject: [PATCH 16/38] spelling: exporter Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e91082ca7..e73fca28c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -708,7 +708,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `opentelemetry-instrumentation-django` Fixed bug where auto-instrumentation fails when django is installed and settings are not configured. ([#1369](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1369)) - `opentelemetry-instrumentation-system-metrics` add supports to collect system thread count. ([#1339](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1339)) -- `opentelemetry-exporter-richconsole` Fixing RichConsoleExpoter to allow multiple traces, fixing duplicate spans and include resources ([#1336](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1336)) +- `opentelemetry-exporter-richconsole` Fixing RichConsoleExporter to allow multiple traces, fixing duplicate spans and include resources ([#1336](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1336)) - `opentelemetry-instrumentation-asgi` Add support for regular expression matching and sanitization of HTTP headers. ([#1333](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1333)) - `opentelemetry-instrumentation-asgi` metrics record target attribute (FastAPI only) From ddc8e9b1301129dccad71aa65743d34f0fa7d212 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 15:53:45 -0500 Subject: [PATCH 17/38] spelling: github Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../src/generate_workflows_lib/__init__.py | 2 +- RELEASING.md | 2 +- docs/conf.py | 4 ++-- .../tests/test_botocore_lambda.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/__init__.py b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/__init__.py index 1ad36c1b10..6c417486cb 100644 --- a/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/__init__.py +++ b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/__init__.py @@ -173,7 +173,7 @@ def get_misc_job_datas(tox_envs: list) -> list: def _generate_workflow( job_datas: list, name: str, workflow_directory_path: Path, max_jobs=250 ): - # Github seems to limit the amount of jobs in a workflow file, that is why + # GitHub seems to limit the amount of jobs in a workflow file, that is why # they are split in groups of 250 per workflow file. for file_number, job_datas in enumerate( [ diff --git a/RELEASING.md b/RELEASING.md index 1b96120db0..2f2bae0f9a 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -68,7 +68,7 @@ The workflow will create a pull request that should be merged in order to procee * Review and merge the pull request that it creates for updating the change log in main (note that if this is not a patch release then the change log on main may already be up-to-date, in which case no pull request will be created). - * Verify that a new [Github release](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) has been created and that the CHANGELOGs look correct. + * Verify that a new [GitHub release](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) has been created and that the CHANGELOGs look correct. ### Releasing individual package diff --git a/docs/conf.py b/docs/conf.py index 8233fccb15..f3b53ecda7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -105,7 +105,7 @@ # Add a .nojekyll file to the generated HTML docs # https://help.github.com/en/articles/files-that-start-with-an-underscore-are-missing "sphinx.ext.githubpages", - # Support external links to different versions in the Github repo + # Support external links to different versions in the GitHub repo "sphinx.ext.extlinks", ] @@ -182,7 +182,7 @@ def getlistcfg(strval): # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = [] -# Support external links to specific versions of the files in the Github repo +# Support external links to specific versions of the files in the GitHub repo branch = os.environ.get("READTHEDOCS_VERSION") if branch is None or branch == "latest": branch = "main" diff --git a/instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_lambda.py b/instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_lambda.py index 098edfc896..6ba46135ee 100644 --- a/instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_lambda.py +++ b/instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_lambda.py @@ -129,7 +129,7 @@ def _create_lambda_function(self, function_name: str, function_code: str): @mark.skip(reason="Docker error, unblocking builds for now.") @mark.skipif( sys.platform == "win32", - reason="requires docker and Github CI Windows does not have docker installed by default", + reason="requires docker and GitHub CI Windows does not have docker installed by default", ) @mock_aws def test_invoke(self): From e16915e507890260414eb56ded0c474fc8c0c410 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 15:54:07 -0500 Subject: [PATCH 18/38] spelling: greater Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e73fca28c6..8e6183bc66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -990,7 +990,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `opentelemetry-instrumentation-pymongo` now supports `pymongo v4` ([#876](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/876)) -- `opentelemetry-instrumentation-httpx` now supports versions higher than `0.19.0`. +- `opentelemetry-instrumentation-httpx` now supports versions greater than `0.19.0`. ([#866](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/866)) ### Fixed From 9cd4a23c476825240a12cd69b8084181044b985f Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:20:00 -0500 Subject: [PATCH 19/38] spelling: handler Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../opentelemetry-instrumentation-grpc/tests/test_filters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-grpc/tests/test_filters.py b/instrumentation/opentelemetry-instrumentation-grpc/tests/test_filters.py index 81cc689edd..a6156e6ef4 100644 --- a/instrumentation/opentelemetry-instrumentation-grpc/tests/test_filters.py +++ b/instrumentation/opentelemetry-instrumentation-grpc/tests/test_filters.py @@ -22,7 +22,7 @@ class _HandlerCallDetails( collections.namedtuple( - "_HanlderCallDetails", + "_HandlerCallDetails", ( "method", "invocation_metadata", From 0bbb6ab1b9fba8bf24e6b46d34e055e07fe4b40a Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 20:10:35 -0500 Subject: [PATCH 20/38] spelling: histogram Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../tests/test_middleware.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py b/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py index 1c85935892..79c50f7526 100644 --- a/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py +++ b/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py @@ -737,7 +737,7 @@ def test_wsgi_metrics(self): duration = max(round((default_timer() - start) * 1000), 0) metrics_list = self.memory_metrics_reader.get_metrics_data() number_data_point_seen = False - histrogram_data_point_seen = False + histogram_data_point_seen = False self.assertTrue(len(metrics_list.resource_metrics) != 0) for resource_metric in metrics_list.resource_metrics: @@ -751,7 +751,7 @@ def test_wsgi_metrics(self): for point in data_points: if isinstance(point, HistogramDataPoint): self.assertEqual(point.count, 3) - histrogram_data_point_seen = True + histogram_data_point_seen = True self.assertAlmostEqual( duration, point.sum, delta=100 ) @@ -766,7 +766,7 @@ def test_wsgi_metrics(self): expected_requests_count_attributes, dict(point.attributes), ) - self.assertTrue(histrogram_data_point_seen and number_data_point_seen) + self.assertTrue(histogram_data_point_seen and number_data_point_seen) # pylint: disable=too-many-locals def test_wsgi_metrics_new_semconv(self): @@ -792,7 +792,7 @@ def test_wsgi_metrics_new_semconv(self): duration_s = default_timer() - start metrics_list = self.memory_metrics_reader.get_metrics_data() number_data_point_seen = False - histrogram_data_point_seen = False + histogram_data_point_seen = False self.assertTrue(len(metrics_list.resource_metrics) != 0) for resource_metric in metrics_list.resource_metrics: @@ -806,7 +806,7 @@ def test_wsgi_metrics_new_semconv(self): for point in data_points: if isinstance(point, HistogramDataPoint): self.assertEqual(point.count, 3) - histrogram_data_point_seen = True + histogram_data_point_seen = True self.assertAlmostEqual( duration_s, point.sum, places=1 ) @@ -821,7 +821,7 @@ def test_wsgi_metrics_new_semconv(self): expected_requests_count_attributes, dict(point.attributes), ) - self.assertTrue(histrogram_data_point_seen and number_data_point_seen) + self.assertTrue(histogram_data_point_seen and number_data_point_seen) # pylint: disable=too-many-locals # pylint: disable=too-many-nested-blocks @@ -863,7 +863,7 @@ def test_wsgi_metrics_both_semconv(self): duration = max(round(duration_s * 1000), 0) metrics_list = self.memory_metrics_reader.get_metrics_data() number_data_point_seen = False - histrogram_data_point_seen = False + histogram_data_point_seen = False self.assertTrue(len(metrics_list.resource_metrics) != 0) for resource_metric in metrics_list.resource_metrics: @@ -877,7 +877,7 @@ def test_wsgi_metrics_both_semconv(self): for point in data_points: if isinstance(point, HistogramDataPoint): self.assertEqual(point.count, 3) - histrogram_data_point_seen = True + histogram_data_point_seen = True if metric.name == "http.server.request.duration": self.assertAlmostEqual( duration_s, point.sum, places=1 @@ -901,7 +901,7 @@ def test_wsgi_metrics_both_semconv(self): expected_requests_count_attributes, dict(point.attributes), ) - self.assertTrue(histrogram_data_point_seen and number_data_point_seen) + self.assertTrue(histogram_data_point_seen and number_data_point_seen) def test_wsgi_metrics_unistrument(self): Client().get("/span_name/1234/") From 760e905bd9443140ff5f2854db0daaf0b7d0229e Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:21:37 -0500 Subject: [PATCH 21/38] spelling: instrumentation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CHANGELOG.md | 16 ++++++++-------- .../instrumentation/celery/__init__.py | 2 +- .../tests/test_duplicate.py | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e6183bc66..9b70de6f63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -542,7 +542,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#1762](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1762)) - `opentelemetry-instrumentation-celery` Add support for anonymous tasks. ([#1407](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1407)) -- `opentelemetry-instrumentation-logging` Add `otelTraceSampled` to instrumetation-logging +- `opentelemetry-instrumentation-logging` Add `otelTraceSampled` to instrumentation-logging ([#1773](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1773)) ### Changed @@ -834,7 +834,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#1117](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1117)) - `opentelemetry-instrumentation-remoulade` Initial release ([#1082](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1082)) -- Added `opentelemetry-instrumention-confluent-kafka` +- Added `opentelemetry-instrumentation-confluent-kafka` ([#1111](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1111)) - Set otlp-proto-grpc as the default metrics exporter for auto-instrumentation ([#1127](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1127)) @@ -1327,7 +1327,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `opentelemetry-instrumentation-flask` Added `request_hook` and `response_hook` callbacks. ([#416](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/416)) -- `opentelemetry-instrumenation-django` now supports request and response hooks. +- `opentelemetry-instrumentation-django` now supports request and response hooks. ([#407](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/407)) - `opentelemetry-instrumentation-falcon` FalconInstrumentor now supports request/response hooks. ([#415](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/415)) @@ -1335,15 +1335,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#426](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/426)) - `opentelemetry-exporter-datadog` Add parsing exception events for error tags. ([#459](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/459)) -- `opentelemetry-instrumenation-django` now supports trace response headers. +- `opentelemetry-instrumentation-django` now supports trace response headers. ([#436](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/436)) -- `opentelemetry-instrumenation-tornado` now supports trace response headers. +- `opentelemetry-instrumentation-tornado` now supports trace response headers. ([#436](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/436)) -- `opentelemetry-instrumenation-pyramid` now supports trace response headers. +- `opentelemetry-instrumentation-pyramid` now supports trace response headers. ([#436](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/436)) -- `opentelemetry-instrumenation-falcon` now supports trace response headers. +- `opentelemetry-instrumentation-falcon` now supports trace response headers. ([#436](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/436)) -- `opentelemetry-instrumenation-flask` now supports trace response headers. +- `opentelemetry-instrumentation-flask` now supports trace response headers. ([#436](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/436)) - `opentelemetry-instrumentation-grpc` Keep client interceptor in sync with grpc client interceptors. ([#442](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/442)) diff --git a/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/__init__.py b/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/__init__.py index 908f158507..8a13278b7b 100644 --- a/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/__init__.py @@ -50,7 +50,7 @@ def add(x, y): Setting up tracing ------------------ -When tracing a celery worker process, tracing and instrumention both must be initialized after the celery worker +When tracing a celery worker process, tracing and instrumentation both must be initialized after the celery worker process is initialized. This is required for any tracing components that might use threading to work correctly such as the BatchSpanProcessor. Celery provides a signal called ``worker_process_init`` that can be used to accomplish this as shown in the example above. diff --git a/instrumentation/opentelemetry-instrumentation-celery/tests/test_duplicate.py b/instrumentation/opentelemetry-instrumentation-celery/tests/test_duplicate.py index ab1f7804cf..8d3a23fc0f 100644 --- a/instrumentation/opentelemetry-instrumentation-celery/tests/test_duplicate.py +++ b/instrumentation/opentelemetry-instrumentation-celery/tests/test_duplicate.py @@ -18,7 +18,7 @@ class TestUtils(unittest.TestCase): - def test_duplicate_instrumentaion(self): + def test_duplicate_instrumentation(self): first = CeleryInstrumentor() first.instrument() second = CeleryInstrumentor() From f9083c5f28ddda2b5f64dfab5f02c0c60da0777f Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 20:13:24 -0500 Subject: [PATCH 22/38] spelling: instrumentor Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- opentelemetry-instrumentation/tests/test_distro.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opentelemetry-instrumentation/tests/test_distro.py b/opentelemetry-instrumentation/tests/test_distro.py index 9801264cbe..97a0b95fd0 100644 --- a/opentelemetry-instrumentation/tests/test_distro.py +++ b/opentelemetry-instrumentation/tests/test_distro.py @@ -20,7 +20,7 @@ from opentelemetry.util._importlib_metadata import EntryPoint -class MockInstrumetor(BaseInstrumentor): +class MockInstrumentor(BaseInstrumentor): def instrumentation_dependencies(self): return [] @@ -36,7 +36,7 @@ def __init__(self, name, value, group): # pylint: disable=super-init-not-called pass def load(self, *args, **kwargs): # pylint: disable=signature-differs - return MockInstrumetor + return MockInstrumentor class MockDistro(BaseDistro): @@ -49,9 +49,9 @@ def test_load_instrumentor(self): # pylint: disable=protected-access distro = MockDistro() - instrumentor = MockInstrumetor() + instrumentor = MockInstrumentor() entry_point = MockEntryPoint( - "MockInstrumetor", + "MockInstrumentor", value="opentelemetry", group="opentelemetry_distro", ) From 0506f3f98c5b8917de0c90124f753c36f18c7f8e Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:22:19 -0500 Subject: [PATCH 23/38] spelling: instrumentors Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../src/opentelemetry/instrumentation/grpc/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/__init__.py b/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/__init__.py index ff0fa93902..24d4fd94bf 100644 --- a/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/__init__.py @@ -259,7 +259,7 @@ async def serve(): server = grpc.server(futures.ThreadPoolExecutor(), interceptors = [my_interceptor]) -``filter_`` option also applies to both global and manual client intrumentors. +``filter_`` option also applies to both global and manual client instrumentors. Environment variable From 1fddcc6f3cf8bfd89c98a7dc64501e2bb23e519b Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:22:09 -0500 Subject: [PATCH 24/38] spelling: integration Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../tests/test_requests_integration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py b/instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py index 366cd0c233..caaecb14be 100644 --- a/instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py +++ b/instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py @@ -701,7 +701,7 @@ def perform_request(url: str, session: requests.Session = None): return session.send(prepared_request) -class TestRequestsIntergrationMetric(TestBase): +class TestRequestsIntegrationMetric(TestBase): URL = "http://examplehost:8000/status/200" def setUp(self): From 44ac0f2c56c34386f5f018c1cb68f77eef6468f5 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:22:51 -0500 Subject: [PATCH 25/38] spelling: mechanism Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../src/opentelemetry/instrumentation/pymongo/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-pymongo/src/opentelemetry/instrumentation/pymongo/__init__.py b/instrumentation/opentelemetry-instrumentation-pymongo/src/opentelemetry/instrumentation/pymongo/__init__.py index e0721f2f2d..a6985fa4f5 100644 --- a/instrumentation/opentelemetry-instrumentation-pymongo/src/opentelemetry/instrumentation/pymongo/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-pymongo/src/opentelemetry/instrumentation/pymongo/__init__.py @@ -218,7 +218,7 @@ class PymongoInstrumentor(BaseInstrumentor): # The instrumentation for PyMongo is based on the event listener interface # https://api.mongodb.com/python/current/api/pymongo/monitoring.html. # This interface only allows to register listeners and does not provide - # an unregister API. In order to provide a mechanishm to disable + # an unregister API. In order to provide a mechanism to disable # instrumentation an enabled flag is implemented in CommandTracer, # it's checked in the different listeners. From 86f8075a220b76541fb79f0a7aae70c41508f87d Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:24:01 -0500 Subject: [PATCH 26/38] spelling: message Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../opentelemetry-instrumentation-aio-pika/tests/consts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-aio-pika/tests/consts.py b/instrumentation/opentelemetry-instrumentation-aio-pika/tests/consts.py index 431780ae7b..a96d22dcb4 100644 --- a/instrumentation/opentelemetry-instrumentation-aio-pika/tests/consts.py +++ b/instrumentation/opentelemetry-instrumentation-aio-pika/tests/consts.py @@ -4,7 +4,7 @@ from yarl import URL AIOPIKA_VERSION_INFO = tuple(int(v) for v in aiopika_version.split(".")) -MESSAGE_ID = "meesage_id" +MESSAGE_ID = "message_id" CORRELATION_ID = "correlation_id" MESSAGING_SYSTEM = "rabbitmq" EXCHANGE_NAME = "exchange_name" From 0f0bf221d81947fee9bf51e8f7418c61b9555727 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:24:42 -0500 Subject: [PATCH 27/38] spelling: middleware Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../tests/test_middleware.py | 10 +++++----- .../tests/test_sqlcommenter.py | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py b/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py index 79c50f7526..d4d82db1bf 100644 --- a/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py +++ b/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py @@ -164,9 +164,9 @@ def test_middleware_added_at_position(self): else: middleware = conf.settings.MIDDLEWARE_CLASSES # adding two dummy middlewares - temprory_middelware = "django.utils.deprecation.MiddlewareMixin" - middleware.append(temprory_middelware) - middleware.append(temprory_middelware) + temprory_middleware = "django.utils.deprecation.MiddlewareMixin" + middleware.append(temprory_middleware) + middleware.append(temprory_middleware) middleware_position = 1 _django_instrumentor.instrument( @@ -184,8 +184,8 @@ def test_middleware_added_at_position_if_wrong_position(self): else: middleware = conf.settings.MIDDLEWARE_CLASSES # adding middleware - temprory_middelware = "django.utils.deprecation.MiddlewareMixin" - middleware.append(temprory_middelware) + temprory_middleware = "django.utils.deprecation.MiddlewareMixin" + middleware.append(temprory_middleware) middleware_position = ( 756 # wrong position out of bound of middleware length ) diff --git a/instrumentation/opentelemetry-instrumentation-django/tests/test_sqlcommenter.py b/instrumentation/opentelemetry-instrumentation-django/tests/test_sqlcommenter.py index eec02d7a54..21665e4fa5 100644 --- a/instrumentation/opentelemetry-instrumentation-django/tests/test_sqlcommenter.py +++ b/instrumentation/opentelemetry-instrumentation-django/tests/test_sqlcommenter.py @@ -83,9 +83,9 @@ def test_middleware_added_at_position(self, sqlcommenter_middleware): middleware = conf.settings.MIDDLEWARE_CLASSES # adding two dummy middlewares - temprory_middelware = "django.utils.deprecation.MiddlewareMixin" - middleware.append(temprory_middelware) - middleware.append(temprory_middelware) + temprory_middleware = "django.utils.deprecation.MiddlewareMixin" + middleware.append(temprory_middleware) + middleware.append(temprory_middleware) middleware_position = 1 _django_instrumentor.instrument( From c0994bcd355f4d7cd998c96f34f79766585a7a6c Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:25:11 -0500 Subject: [PATCH 28/38] spelling: multiple Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../tests/test_fastapi_instrumentation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py b/instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py index fdbad4effb..13912c3f56 100644 --- a/instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py +++ b/instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py @@ -1121,7 +1121,7 @@ def test_request(self): self.assertEqual(span.resource.attributes["key1"], "value1") self.assertEqual(span.resource.attributes["key2"], "value2") - def test_mulitple_way_instrumentation(self): + def test_multiple_way_instrumentation(self): self._instrumentor.instrument_app(self._app) count = 0 for middleware in self._app.user_middleware: From b55c86270dde1810b8adda3be31a839a51b2d5e7 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:25:29 -0500 Subject: [PATCH 29/38] spelling: necessarily Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../src/opentelemetry/instrumentation/boto3sqs/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-boto3sqs/src/opentelemetry/instrumentation/boto3sqs/__init__.py b/instrumentation/opentelemetry-instrumentation-boto3sqs/src/opentelemetry/instrumentation/boto3sqs/__init__.py index 83e5ed70bc..6919a5c3aa 100644 --- a/instrumentation/opentelemetry-instrumentation-boto3sqs/src/opentelemetry/instrumentation/boto3sqs/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-boto3sqs/src/opentelemetry/instrumentation/boto3sqs/__init__.py @@ -373,7 +373,7 @@ def delete_message_wrapper_batch(wrapped, instance, args, kwargs): def _wrap_client_creation(self) -> None: """ - Since botocore creates classes on the fly using schemas, the SQS class is not necesraily created upon the call + Since botocore creates classes on the fly using schemas, the SQS class is not necessarily created upon the call of `instrument()`. Therefore we need to wrap the creation of the boto3 client, which triggers the creation of the SQS client. """ From 4481ba3264764c4388e008ea995fc1aa8be0c087 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 15:54:40 -0500 Subject: [PATCH 30/38] spelling: nonexistent Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../src/opentelemetry/instrumentation/django/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py index f23b9e91a6..6d24cbb608 100644 --- a/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py @@ -399,7 +399,7 @@ def _instrument(self, **kwargs): settings_middleware = getattr(settings, _middleware_setting, []) except ModuleNotFoundError as exception: _logger.debug( - "DJANGO_SETTINGS_MODULE points to a non-existent module. Defaulting to empty settings: %s", + "DJANGO_SETTINGS_MODULE points to a nonexistent module. Defaulting to empty settings: %s", exception, ) settings.configure() From 29f99f624734cd84127d358ae427050fd2ba3c68 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 21:00:46 -0500 Subject: [PATCH 31/38] spelling: opener Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../tests/test_urllib_integration.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py b/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py index b085cc50d5..deca37fe40 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py +++ b/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py @@ -357,10 +357,10 @@ def test_uninstrument(self): URLLibInstrumentor().instrument() def test_uninstrument_session(self): - clienr1 = urllib.request.build_opener() - URLLibInstrumentor().uninstrument_opener(clienr1) + opener1 = urllib.request.build_opener() + URLLibInstrumentor().uninstrument_opener(opener1) - result = self.perform_request(self.URL, clienr1) + result = self.perform_request(self.URL, opener1) self.assertEqual(result.read(), b"Hello!") self.assert_span(num_spans=0) From 00453ae4d547c4bbe87703f3d525e6d7f2063cae Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:26:30 -0500 Subject: [PATCH 32/38] spelling: opentelemetry Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CHANGELOG.md | 10 +++++----- .../opentelemetry/instrumentation/pyramid/callbacks.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b70de6f63..5ff1dd5862 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -509,7 +509,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#1879](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1879)) - Add optional distro and configurator selection for auto-instrumentation ([#1823](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1823)) -- `opentelemetry-instrumentation-django` - Add option to add Opentelemetry middleware at specific position in middleware chain +- `opentelemetry-instrumentation-django` - Add option to add OpenTelemetry middleware at specific position in middleware chain ([#2912]https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2912) ### Added @@ -626,7 +626,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#1575](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1575)) - Fix SQLAlchemy uninstrumentation ([#1581](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1581)) -- `opentelemetry-instrumentation-grpc` Fix code()/details() of \_OpentelemetryServicerContext. +- `opentelemetry-instrumentation-grpc` Fix code()/details() of \_OpenTelemetryServicerContext. ([#1578](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1578)) - Fix aiopg instrumentation to work with aiopg < 2.0.0 ([#1473](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1473)) @@ -1115,7 +1115,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#667](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/667)) - `opentelemetry-instrumentation-urllib3`, `opentelemetry-instrumentation-requests` The `net.peer.ip` attribute is set to the IP of the connected HTTP server or proxy - using a new instrumentor in `opententelemetry-util-http` + using a new instrumentor in `opentelemetry-util-http` ([#661](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/661)) - `opentelemetry-instrumentation-pymongo` Add check for suppression key in PyMongo. ([#736](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/736)) @@ -1171,7 +1171,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `opentelemetry-sdk-extension-aws` Add AWS resource detectors to extension package ([#586](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/586)) -- `opentelemetry-instrumentation-asgi`, `opentelemetry-instrumentation-aiohttp-client`, `openetelemetry-instrumentation-fastapi`, +- `opentelemetry-instrumentation-asgi`, `opentelemetry-instrumentation-aiohttp-client`, `opentelemetry-instrumentation-fastapi`, `opentelemetry-instrumentation-starlette`, `opentelemetry-instrumentation-urllib`, `opentelemetry-instrumentation-urllib3` Added `request_hook` and `response_hook` callbacks ([#576](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/576)) - `opentelemetry-instrumentation-pika` added RabbitMQ's pika module instrumentation. @@ -1223,7 +1223,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#566](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/566)) - Include Flask 2.0 as compatible with existing flask instrumentation ([#545](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/545)) -- `openelemetry-sdk-extension-aws` Take a dependency on `opentelemetry-sdk` +- `opentelemetry-sdk-extension-aws` Take a dependency on `opentelemetry-sdk` ([#558](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/558)) - Change `opentelemetry-instrumentation-httpx` to replace `client` classes with instrumented versions. ([#577](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/577)) diff --git a/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py b/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py index 6a526f2235..99eee39e19 100644 --- a/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py +++ b/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py @@ -74,7 +74,7 @@ def _before_traversal(event): enabled = request_environ.get(_ENVIRON_ENABLED_KEY) if enabled is None: _logger.warning( - "Opentelemetry pyramid tween 'opentelemetry.instrumentation.pyramid.trace_tween_factory'" + "OpenTelemetry pyramid tween 'opentelemetry.instrumentation.pyramid.trace_tween_factory'" "was not called. Make sure that the tween is included in 'pyramid.tweens' if" "the tween list was created manually" ) From 580cfd002c409a3ff67f35eb564a762c9ae2e699 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 16:09:01 -0500 Subject: [PATCH 33/38] spelling: short_lived Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../tests/test_sqlalchemy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py index 42a6670eb9..1a0c03c757 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py @@ -434,7 +434,7 @@ def test_no_memory_leakage_if_engine_disposed(self): callback = mock.Mock() - def make_shortlived_engine(): + def make_short_lived_engine(): engine = create_engine("sqlite:///:memory:") # Callback will be called if engine is deallocated during garbage # collection @@ -443,7 +443,7 @@ def make_shortlived_engine(): conn.execute(text("SELECT 1 + 1;")).fetchall() for _ in range(0, 5): - make_shortlived_engine() + make_short_lived_engine() gc.collect() assert callback.call_count == 5 From d1d4e996ced87fee828b86e95c12f360856cdec7 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 23:03:59 -0500 Subject: [PATCH 34/38] spelling: subprocess Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- scripts/eachdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/eachdist.py b/scripts/eachdist.py index ca490546eb..77211a9a67 100755 --- a/scripts/eachdist.py +++ b/scripts/eachdist.py @@ -401,7 +401,7 @@ def runsubprocess(dry_run, params, *args, **kwargs): # for CreateProcessW which subprocess.run and Popen use is a follows # (https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw): # > 1. The directory from which the application loaded. - # This will be the directory of the global python.exe, not the venv directory, due to the suprocess mechanism. + # This will be the directory of the global python.exe, not the venv directory, due to the subprocess mechanism. # > 6. The directories that are listed in the PATH environment variable. # Only this would find the "correct" python.exe. From a35eb93535fac17d441f1c3a2eb2e34e7a133d67 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 20:22:08 -0500 Subject: [PATCH 35/38] spelling: temporary Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../tests/test_middleware.py | 10 +++++----- .../tests/test_sqlcommenter.py | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py b/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py index d4d82db1bf..66112503b4 100644 --- a/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py +++ b/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py @@ -164,9 +164,9 @@ def test_middleware_added_at_position(self): else: middleware = conf.settings.MIDDLEWARE_CLASSES # adding two dummy middlewares - temprory_middleware = "django.utils.deprecation.MiddlewareMixin" - middleware.append(temprory_middleware) - middleware.append(temprory_middleware) + temporary_middleware = "django.utils.deprecation.MiddlewareMixin" + middleware.append(temporary_middleware) + middleware.append(temporary_middleware) middleware_position = 1 _django_instrumentor.instrument( @@ -184,8 +184,8 @@ def test_middleware_added_at_position_if_wrong_position(self): else: middleware = conf.settings.MIDDLEWARE_CLASSES # adding middleware - temprory_middleware = "django.utils.deprecation.MiddlewareMixin" - middleware.append(temprory_middleware) + temporary_middleware = "django.utils.deprecation.MiddlewareMixin" + middleware.append(temporary_middleware) middleware_position = ( 756 # wrong position out of bound of middleware length ) diff --git a/instrumentation/opentelemetry-instrumentation-django/tests/test_sqlcommenter.py b/instrumentation/opentelemetry-instrumentation-django/tests/test_sqlcommenter.py index 21665e4fa5..d3acd65a2b 100644 --- a/instrumentation/opentelemetry-instrumentation-django/tests/test_sqlcommenter.py +++ b/instrumentation/opentelemetry-instrumentation-django/tests/test_sqlcommenter.py @@ -83,9 +83,9 @@ def test_middleware_added_at_position(self, sqlcommenter_middleware): middleware = conf.settings.MIDDLEWARE_CLASSES # adding two dummy middlewares - temprory_middleware = "django.utils.deprecation.MiddlewareMixin" - middleware.append(temprory_middleware) - middleware.append(temprory_middleware) + temporary_middleware = "django.utils.deprecation.MiddlewareMixin" + middleware.append(temporary_middleware) + middleware.append(temporary_middleware) middleware_position = 1 _django_instrumentor.instrument( From 0d4f2e9353ad44a04c4baa08b5ce0d06b9f6079e Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 15:51:52 -0500 Subject: [PATCH 36/38] spelling: the Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../example/README.md | 2 +- .../src/opentelemetry/instrumentation/logging/constants.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exporter/opentelemetry-exporter-prometheus-remote-write/example/README.md b/exporter/opentelemetry-exporter-prometheus-remote-write/example/README.md index 799c7e3101..00431a3481 100644 --- a/exporter/opentelemetry-exporter-prometheus-remote-write/example/README.md +++ b/exporter/opentelemetry-exporter-prometheus-remote-write/example/README.md @@ -14,7 +14,7 @@ data *Users do not need to install Python as the app will be run in the Docker Container* ## Instructions -1. Run `docker-compose up -d` in the the `example/` directory +1. Run `docker-compose up -d` in the `example/` directory The `-d` flag causes all services to run in detached mode and frees up your terminal session. This also causes no logs to show up. Users can attach themselves to the service's logs manually using `docker logs ${CONTAINER_ID} --follow` diff --git a/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/constants.py b/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/constants.py index 5eb6798231..980b1bb002 100644 --- a/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/constants.py +++ b/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/constants.py @@ -18,7 +18,7 @@ _MODULE_DOC = """ The OpenTelemetry ``logging`` integration automatically injects tracing context into log statements. -The integration registers a custom log record factory with the the standard library logging module that automatically inject +The integration registers a custom log record factory with the standard library logging module that automatically inject tracing context into log record objects. Optionally, the integration can also call ``logging.basicConfig()`` to set a logging format with placeholders for span ID, trace ID and service name. From b9f0fd32eb12bb16a8cb17c11ed0e13ac37b418c Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 20:22:29 -0500 Subject: [PATCH 37/38] spelling: uninstrument Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../tests/test_middleware.py | 2 +- .../tests/test_mysql_integration.py | 2 +- .../tests/test_starlette_instrumentation.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py b/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py index 66112503b4..170b4e3811 100644 --- a/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py +++ b/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py @@ -903,7 +903,7 @@ def test_wsgi_metrics_both_semconv(self): ) self.assertTrue(histogram_data_point_seen and number_data_point_seen) - def test_wsgi_metrics_unistrument(self): + def test_wsgi_metrics_uninstrument(self): Client().get("/span_name/1234/") _django_instrumentor.uninstrument() Client().get("/span_name/1234/") diff --git a/instrumentation/opentelemetry-instrumentation-mysql/tests/test_mysql_integration.py b/instrumentation/opentelemetry-instrumentation-mysql/tests/test_mysql_integration.py index 79399cce7f..1e3b28cb65 100644 --- a/instrumentation/opentelemetry-instrumentation-mysql/tests/test_mysql_integration.py +++ b/instrumentation/opentelemetry-instrumentation-mysql/tests/test_mysql_integration.py @@ -54,7 +54,7 @@ def test_instrumentor(self, mock_connect): span, opentelemetry.instrumentation.mysql ) - # check that no spans are generated after uninstrumen + # check that no spans are generated after uninstrument MySQLInstrumentor().uninstrument() connect_and_execute_query() diff --git a/instrumentation/opentelemetry-instrumentation-starlette/tests/test_starlette_instrumentation.py b/instrumentation/opentelemetry-instrumentation-starlette/tests/test_starlette_instrumentation.py index af550173ef..39e88ba4b0 100644 --- a/instrumentation/opentelemetry-instrumentation-starlette/tests/test_starlette_instrumentation.py +++ b/instrumentation/opentelemetry-instrumentation-starlette/tests/test_starlette_instrumentation.py @@ -242,7 +242,7 @@ def test_basic_post_request_metric_success(self): ) self.assertEqual(point.value, 0) - def test_metric_for_uninstrment_app_method(self): + def test_metric_for_uninstrument_app_method(self): self._client.get("/foobar") # uninstrumenting the existing client app self._instrumentor.uninstrument_app(self._app) From d37ef5292a3a52b65a4cdcf8addd80577eb138e0 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 2 Jan 2025 15:54:50 -0500 Subject: [PATCH 38/38] spelling: vm Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../src/opentelemetry/resource/detector/azure/_constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resource/opentelemetry-resource-detector-azure/src/opentelemetry/resource/detector/azure/_constants.py b/resource/opentelemetry-resource-detector-azure/src/opentelemetry/resource/detector/azure/_constants.py index 3a6415e0d5..3805e00c56 100644 --- a/resource/opentelemetry-resource-detector-azure/src/opentelemetry/resource/detector/azure/_constants.py +++ b/resource/opentelemetry-resource-detector-azure/src/opentelemetry/resource/detector/azure/_constants.py @@ -50,7 +50,7 @@ ResourceAttributes.FAAS_MAX_MEMORY: _WEBSITE_MEMORY_LIMIT_MB, } -# Vm +# VM _AZURE_VM_METADATA_ENDPOINT = "http://169.254.169.254/metadata/instance/compute?api-version=2021-12-13&format=json" _AZURE_VM_SCALE_SET_NAME_ATTRIBUTE = "azure.vm.scaleset.name"