Skip to content

Commit 966142e

Browse files
Merge branch 'main' into feature/metric_status_code_span_not_recording
2 parents adeb7e9 + 16eaec8 commit 966142e

File tree

8 files changed

+22
-11
lines changed

8 files changed

+22
-11
lines changed

instrumentation/opentelemetry-instrumentation-aiopg/test-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Deprecated==1.2.14
55
iniconfig==2.0.0
66
packaging==24.0
77
pluggy==1.5.0
8-
psycopg2-binary==2.9.9
8+
psycopg2-binary==2.9.10
99
py-cpuinfo==9.0.0
1010
pytest==7.4.4
1111
tomli==2.0.1

instrumentation/opentelemetry-instrumentation-cassandra/tests/test_cassandra_integration.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ def tearDown(self):
4343
with self.disable_logging():
4444
CassandraInstrumentor().uninstrument()
4545

46+
@property
47+
def _mocked_session(self):
48+
return cassandra.cluster.Session(cluster=mock.Mock(), hosts=[])
49+
4650
def test_instrument_uninstrument(self):
4751
instrumentation = CassandraInstrumentor()
4852
instrumentation.instrument()
@@ -67,7 +71,7 @@ def test_instrumentor(
6771
):
6872
mock_create_response_future.return_value = mock.Mock()
6973
mock_session_init.return_value = None
70-
mock_connect.return_value = cassandra.cluster.Session()
74+
mock_connect.return_value = self._mocked_session
7175

7276
CassandraInstrumentor().instrument()
7377

@@ -100,7 +104,7 @@ def test_custom_tracer_provider(
100104
):
101105
mock_create_response_future.return_value = mock.Mock()
102106
mock_session_init.return_value = None
103-
mock_connect.return_value = cassandra.cluster.Session()
107+
mock_connect.return_value = self._mocked_session
104108

105109
resource = resources.Resource.create({})
106110
result = self.create_tracer_provider(resource=resource)
@@ -124,7 +128,7 @@ def test_instrument_connection_no_op_tracer_provider(
124128
):
125129
mock_create_response_future.return_value = mock.Mock()
126130
mock_session_init.return_value = None
127-
mock_connect.return_value = cassandra.cluster.Session()
131+
mock_connect.return_value = self._mocked_session
128132

129133
tracer_provider = trace_api.NoOpTracerProvider()
130134
CassandraInstrumentor().instrument(tracer_provider=tracer_provider)

instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/utils.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,20 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
from __future__ import annotations
16+
1517
import logging
16-
from typing import ContextManager, Optional, Tuple
18+
from typing import TYPE_CHECKING, Optional, Tuple
1719

1820
from celery import registry # pylint: disable=no-name-in-module
1921
from celery.app.task import Task
2022

2123
from opentelemetry.semconv.trace import SpanAttributes
2224
from opentelemetry.trace import Span
2325

26+
if TYPE_CHECKING:
27+
from contextlib import AbstractContextManager
28+
2429
logger = logging.getLogger(__name__)
2530

2631
# Celery Context key
@@ -123,7 +128,7 @@ def attach_context(
123128
task: Optional[Task],
124129
task_id: str,
125130
span: Span,
126-
activation: ContextManager[Span],
131+
activation: AbstractContextManager[Span],
127132
token: Optional[object],
128133
is_publish: bool = False,
129134
) -> None:
@@ -171,7 +176,7 @@ def detach_context(task, task_id, is_publish=False) -> None:
171176

172177
def retrieve_context(
173178
task, task_id, is_publish=False
174-
) -> Optional[Tuple[Span, ContextManager[Span], Optional[object]]]:
179+
) -> Optional[Tuple[Span, AbstractContextManager[Span], Optional[object]]]:
175180
"""Helper to retrieve an active `Span`, `ContextManager` and context token
176181
stored in a `Task` instance
177182
"""

instrumentation/opentelemetry-instrumentation-celery/test-requirements-1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
amqp==5.2.0
22
asgiref==3.8.1
3-
billiard==4.2.0
3+
billiard==4.2.1
44
celery==5.3.6
55
click==8.1.7
66
click-didyoumean==0.3.0

instrumentation/opentelemetry-instrumentation-psycopg/test-requirements-1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Deprecated==1.2.14
33
iniconfig==2.0.0
44
packaging==24.0
55
pluggy==1.5.0
6-
psycopg==3.1.18
6+
psycopg==3.2.2
77
py-cpuinfo==9.0.0
88
pytest==7.4.4
99
tomli==2.0.1

instrumentation/opentelemetry-instrumentation-psycopg2/test-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Deprecated==1.2.14
33
iniconfig==2.0.0
44
packaging==24.0
55
pluggy==1.5.0
6-
psycopg2==2.9.9
6+
psycopg2==2.9.10
77
py-cpuinfo==9.0.0
88
pytest==7.4.4
99
tomli==2.0.1

sdk-extension/opentelemetry-sdk-extension-aws/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
## Version 2.1.0 (2024-12-24)
11+
1012
- Make ec2 resource detector silent when loaded outside AWS
1113
([#3120](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3120))
1214
- Make ecs and beanstalk resource detector silent when loaded outside AWS

sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "2.1.0.dev"
15+
__version__ = "2.2.0.dev"

0 commit comments

Comments
 (0)