Skip to content

Commit

Permalink
Replace assertEqualSpanInstrumentationInfo with assertEqualSpanInstru…
Browse files Browse the repository at this point in the history
…mentationScope (#3037)

* Replace assertInstInfo with assertInstScope

* Update Changelog

* Fix order of other changelog entries
  • Loading branch information
tammy-baylis-swi authored Nov 22, 2024
1 parent d9e1448 commit 5c5fc73
Show file tree
Hide file tree
Showing 18 changed files with 63 additions and 61 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#3027](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3027))
- `opentelemetry-instrumentation-mysqlclient` Add sqlcommenter support
([#2941](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2941))
- `opentelemetry-instrumentation-pymysql` Add sqlcommenter support
([#2942](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2942))

### Fixed

Expand All @@ -34,6 +36,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#3025](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3025))
- `opentelemetry-instrumentation-httpx`: Check if mount transport is none before wrap it
([#3022](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3022))
- Replace all instrumentor unit test `assertEqualSpanInstrumentationInfo` calls with `assertEqualSpanInstrumentationScope` calls
([#3037](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3037))

### Breaking changes

Expand All @@ -58,8 +62,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#2635](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2635))
- `opentelemetry-instrumentation` Add support for string based dotted module paths in unwrap
([#2919](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2919))
- `opentelemetry-instrumentation-pymysql` Add sqlcommenter support
([#2942](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2942))

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def test_instrumentor_connect(self):
span = spans_list[0]

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.aiopg
)

Expand Down Expand Up @@ -96,7 +96,7 @@ async def _ctx_manager_connect():
span = spans_list[0]

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.aiopg
)

Expand All @@ -117,7 +117,7 @@ def test_instrumentor_create_pool(self):
span = spans_list[0]

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.aiopg
)

Expand Down Expand Up @@ -148,7 +148,7 @@ async def _ctx_manager_pool():
span = spans_list[0]

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.aiopg
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_instrumentor(
span = spans_list[0]

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.cassandra
)
self.assertEqual(span.name, "Cassandra")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test_instrumentor(self, request_mock):
span = spans_list[0]

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.elasticsearch
)

Expand Down Expand Up @@ -608,7 +608,7 @@ def test_bulk(self, request_mock):
span = spans_list[0]

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.elasticsearch
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ async def test_unary_unary(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -142,7 +142,7 @@ async def test_unary_stream(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -170,7 +170,7 @@ async def test_stream_unary(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -200,7 +200,7 @@ async def test_stream_stream(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async def request(channel):
self.assertIs(span.kind, trace.SpanKind.SERVER)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -164,7 +164,7 @@ async def request(channel):
self.assertIs(span.kind, trace.SpanKind.SERVER)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -217,7 +217,7 @@ async def request(channel):
self.assertIs(parent_span.kind, trace.SpanKind.SERVER)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
parent_span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -263,7 +263,7 @@ async def request(channel):
self.assertIs(span.kind, trace.SpanKind.SERVER)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -318,7 +318,7 @@ async def request(channel):
self.assertIs(parent_span.kind, trace.SpanKind.SERVER)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
parent_span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -514,7 +514,7 @@ async def request(channel):
self.assertIs(span.kind, trace.SpanKind.SERVER)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -579,7 +579,7 @@ async def request(channel):
self.assertIs(span.kind, trace.SpanKind.SERVER)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def test_unary_unary_future(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand All @@ -125,7 +125,7 @@ def test_unary_unary(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand All @@ -151,7 +151,7 @@ def test_unary_stream(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand All @@ -177,7 +177,7 @@ def test_stream_unary(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -205,7 +205,7 @@ def test_stream_stream(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def test_unary_unary_future(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand All @@ -130,7 +130,7 @@ def test_unary_unary(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -260,7 +260,7 @@ def test_unary_unary_future(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand All @@ -274,7 +274,7 @@ def test_unary_unary(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -443,7 +443,7 @@ def test_unary_unary_future(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand All @@ -457,7 +457,7 @@ def test_unary_unary(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand All @@ -483,7 +483,7 @@ def test_unary_stream(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand All @@ -509,7 +509,7 @@ def test_stream_unary(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -537,7 +537,7 @@ def test_stream_stream(self):
self.assertIs(span.kind, trace.SpanKind.CLIENT)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def handler(request, context):
self.assertIs(span.kind, trace.SpanKind.SERVER)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -188,7 +188,7 @@ def test_create_span(self):
self.assertIs(span.kind, trace.SpanKind.SERVER)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -252,7 +252,7 @@ def SimpleMethod(self, request, context):
self.assertIs(parent_span.kind, trace.SpanKind.SERVER)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
parent_span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -307,7 +307,7 @@ def test_create_span_streaming(self):
self.assertIs(span.kind, trace.SpanKind.SERVER)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -371,7 +371,7 @@ def ServerStreamingMethod(self, request, context):
self.assertIs(parent_span.kind, trace.SpanKind.SERVER)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
parent_span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -594,7 +594,7 @@ def unset_status_handler(request, context):
self.assertIs(span.kind, trace.SpanKind.SERVER)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -626,7 +626,7 @@ def unset_status_handler(request, context):
self.assertIs(span.kind, trace.SpanKind.SERVER)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def handler(request, context):
self.assertIs(span.kind, trace.SpanKind.SERVER)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down Expand Up @@ -195,7 +195,7 @@ def test_create_span(self):
self.assertIs(span.kind, trace.SpanKind.SERVER)

# Check version and name in span's instrumentation info
self.assertEqualSpanInstrumentationInfo(
self.assertEqualSpanInstrumentationScope(
span, opentelemetry.instrumentation.grpc
)

Expand Down
Loading

0 comments on commit 5c5fc73

Please sign in to comment.