Skip to content

Commit 1d31587

Browse files
authored
Merge branch 'main' into py313
2 parents ec14458 + 396aad9 commit 1d31587

File tree

7 files changed

+22
-15
lines changed

7 files changed

+22
-15
lines changed

instrumentation-genai/opentelemetry-instrumentation-openai-v2/examples/zero-code/.env

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ OPENAI_API_KEY=sk-YOUR_API_KEY
1212

1313
OTEL_SERVICE_NAME=opentelemetry-python-openai
1414

15-
# Change to 'false' to disable logging
15+
# Change to 'false' to disable collection of python logging logs
1616
OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true
17-
# Change to 'console' if your OTLP endpoint doesn't support logs
18-
# TODO: this should not be necessary once https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3042 is released
19-
OTEL_LOGS_EXPORTER=otlp
17+
18+
# Uncomment if your OTLP endpoint doesn't support logs
19+
# OTEL_LOGS_EXPORTER=console
20+
2021
# Change to 'false' to hide prompt and completion content
2122
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true

instrumentation-genai/opentelemetry-instrumentation-vertexai/examples/zero-code/.env

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44

55
OTEL_SERVICE_NAME=opentelemetry-python-vertexai
66

7-
# Change to 'false' to disable logging
7+
# Change to 'false' to disable collection of python logging logs
88
OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true
9-
# Change to 'console' if your OTLP endpoint doesn't support logs
10-
# TODO: this should not be necessary once https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3042 is released
11-
OTEL_LOGS_EXPORTER=otlp
9+
10+
# Uncomment if your OTLP endpoint doesn't support logs
11+
# OTEL_LOGS_EXPORTER=console
12+
1213
# Change to 'false' to hide prompt and completion content
1314
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true

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-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

0 commit comments

Comments
 (0)