diff --git a/.riot/requirements/1215c62.txt b/.riot/requirements/1215c62.txt new file mode 100644 index 00000000000..8906634707c --- /dev/null +++ b/.riot/requirements/1215c62.txt @@ -0,0 +1,47 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/1215c62.in +# +aiosqlite==0.20.0 +annotated-types==0.7.0 +attrs==24.2.0 +blinker==1.8.2 +bytecode==0.15.1 +cattrs==22.2.0 +certifi==2024.8.30 +charset-normalizer==3.4.0 +click==8.1.7 +coverage[toml]==7.6.4 +flask==3.0.3 +hypothesis==6.45.0 +idna==3.10 +iniconfig==2.0.0 +iso8601==2.1.0 +itsdangerous==2.2.0 +jinja2==3.1.4 +markupsafe==3.0.2 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.1 +peewee==3.17.7 +pluggy==1.5.0 +pony==0.7.19 +protobuf==5.28.2 +pycryptodome==3.21.0 +pydantic==2.9.2 +pydantic-core==2.23.4 +pypika-tortoise==0.2.1 +pytest==8.3.3 +pytest-cov==5.0.0 +pytest-mock==3.14.0 +pytz==2024.2 +requests==2.32.3 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +tortoise-orm==0.21.7 +typing-extensions==4.12.2 +urllib3==2.2.3 +werkzeug==3.0.4 +xmltodict==0.14.2 diff --git a/.riot/requirements/132f882.txt b/.riot/requirements/132f882.txt new file mode 100644 index 00000000000..bafe49562a3 --- /dev/null +++ b/.riot/requirements/132f882.txt @@ -0,0 +1,47 @@ +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/132f882.in +# +attrs==24.2.0 +boto3==1.35.45 +botocore==1.35.45 +bytecode==0.15.1 +certifi==2024.8.30 +charset-normalizer==3.4.0 +coverage[toml]==7.6.4 +datadog==0.50.1 +datadog-lambda==6.99.0 +ddtrace==2.14.4 +deprecated==1.2.14 +envier==0.6.1 +exceptiongroup==1.2.2 +hypothesis==6.45.0 +idna==3.10 +importlib-metadata==8.4.0 +iniconfig==2.0.0 +jmespath==1.0.1 +mock==5.1.0 +opentelemetry-api==1.27.0 +opentracing==2.4.0 +packaging==24.1 +pluggy==1.5.0 +protobuf==5.28.2 +pytest==8.3.3 +pytest-asyncio==0.21.1 +pytest-cov==5.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.15.0 +python-dateutil==2.9.0.post0 +requests==2.32.3 +s3transfer==0.10.3 +six==1.16.0 +sortedcontainers==2.4.0 +tomli==2.0.2 +typing-extensions==4.12.2 +ujson==5.10.0 +urllib3==1.26.20 +wrapt==1.16.0 +xmltodict==0.14.2 +zipp==3.20.2 diff --git a/.riot/requirements/16af7e0.txt b/.riot/requirements/16af7e0.txt deleted file mode 100644 index df479a84c64..00000000000 --- a/.riot/requirements/16af7e0.txt +++ /dev/null @@ -1,49 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile --no-annotate --resolver=backtracking .riot/requirements/16af7e0.in -# -attrs==23.2.0 -boto3==1.34.139 -botocore==1.34.139 -bytecode==0.15.1 -cattrs==23.2.3 -certifi==2024.7.4 -charset-normalizer==3.3.2 -coverage[toml]==7.5.4 -datadog==0.49.1 -datadog-lambda==6.96.0 -ddsketch==3.0.1 -ddtrace==2.9.2 -deprecated==1.2.14 -envier==0.5.2 -exceptiongroup==1.2.1 -hypothesis==6.45.0 -idna==3.7 -importlib-metadata==7.1.0 -iniconfig==2.0.0 -jmespath==1.0.1 -mock==5.1.0 -opentelemetry-api==1.26.0 -opentracing==2.4.0 -packaging==24.1 -pluggy==1.5.0 -protobuf==5.27.2 -pytest==8.2.2 -pytest-asyncio==0.21.1 -pytest-cov==5.0.0 -pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-dateutil==2.9.0.post0 -requests==2.32.3 -s3transfer==0.10.2 -six==1.16.0 -sortedcontainers==2.4.0 -tomli==2.0.1 -typing-extensions==4.12.2 -ujson==5.10.0 -urllib3==1.26.19 -wrapt==1.16.0 -xmltodict==0.13.0 -zipp==3.19.2 diff --git a/.riot/requirements/1dcfbb2.txt b/.riot/requirements/1dcfbb2.txt new file mode 100644 index 00000000000..8ac7a88fe1c --- /dev/null +++ b/.riot/requirements/1dcfbb2.txt @@ -0,0 +1,47 @@ +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/1dcfbb2.in +# +attrs==24.2.0 +boto3==1.35.45 +botocore==1.35.45 +bytecode==0.15.1 +certifi==2024.8.30 +charset-normalizer==3.4.0 +coverage[toml]==7.6.4 +datadog==0.50.1 +datadog-lambda==6.99.0 +ddtrace==2.14.4 +deprecated==1.2.14 +envier==0.6.1 +exceptiongroup==1.2.2 +hypothesis==6.45.0 +idna==3.10 +importlib-metadata==8.4.0 +iniconfig==2.0.0 +jmespath==1.0.1 +mock==5.1.0 +opentelemetry-api==1.27.0 +opentracing==2.4.0 +packaging==24.1 +pluggy==1.5.0 +protobuf==5.28.2 +pytest==8.3.3 +pytest-asyncio==0.21.1 +pytest-cov==5.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.15.0 +python-dateutil==2.9.0.post0 +requests==2.32.3 +s3transfer==0.10.3 +six==1.16.0 +sortedcontainers==2.4.0 +tomli==2.0.2 +typing-extensions==4.12.2 +ujson==5.10.0 +urllib3==1.26.20 +wrapt==1.16.0 +xmltodict==0.14.2 +zipp==3.20.2 diff --git a/.riot/requirements/1aaf6f6.txt b/.riot/requirements/1e6bfcb.txt similarity index 55% rename from .riot/requirements/1aaf6f6.txt rename to .riot/requirements/1e6bfcb.txt index 5c36c6f9871..696f9d3801b 100644 --- a/.riot/requirements/1aaf6f6.txt +++ b/.riot/requirements/1e6bfcb.txt @@ -2,48 +2,46 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --no-annotate --resolver=backtracking .riot/requirements/1aaf6f6.in +# pip-compile --no-annotate --resolver=backtracking .riot/requirements/1e6bfcb.in # -attrs==23.2.0 -boto3==1.34.139 -botocore==1.34.139 +attrs==24.2.0 +boto3==1.35.45 +botocore==1.35.45 bytecode==0.15.1 -cattrs==23.2.3 -certifi==2024.7.4 -charset-normalizer==3.3.2 -coverage[toml]==7.5.4 -datadog==0.49.1 -datadog-lambda==6.96.0 -ddsketch==3.0.1 -ddtrace==2.9.2 +certifi==2024.8.30 +charset-normalizer==3.4.0 +coverage[toml]==7.6.1 +datadog==0.50.1 +datadog-lambda==6.99.0 +ddtrace==2.14.4 deprecated==1.2.14 -envier==0.5.2 -exceptiongroup==1.2.1 +envier==0.6.1 +exceptiongroup==1.2.2 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==7.1.0 +idna==3.10 +importlib-metadata==8.4.0 iniconfig==2.0.0 jmespath==1.0.1 mock==5.1.0 -opentelemetry-api==1.26.0 +opentelemetry-api==1.27.0 opentracing==2.4.0 packaging==24.1 pluggy==1.5.0 -protobuf==5.27.2 -pytest==8.2.2 +protobuf==5.28.2 +pytest==8.3.3 pytest-asyncio==0.21.1 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 python-dateutil==2.9.0.post0 requests==2.32.3 -s3transfer==0.10.2 +s3transfer==0.10.3 six==1.16.0 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.0.2 typing-extensions==4.12.2 ujson==5.10.0 -urllib3==1.26.19 +urllib3==1.26.20 wrapt==1.16.0 -xmltodict==0.13.0 -zipp==3.19.2 +xmltodict==0.14.2 +zipp==3.20.2 diff --git a/.riot/requirements/1f3d2c7.txt b/.riot/requirements/1f3d2c7.txt deleted file mode 100644 index 5d5a92ead13..00000000000 --- a/.riot/requirements/1f3d2c7.txt +++ /dev/null @@ -1,49 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1f3d2c7.in -# -aiosqlite==0.17.0 -annotated-types==0.7.0 -attrs==23.2.0 -blinker==1.8.2 -bytecode==0.15.1 -cattrs==22.2.0 -certifi==2024.7.4 -charset-normalizer==3.3.2 -click==8.1.7 -coverage[toml]==7.6.0 -envier==0.5.2 -flask==3.0.3 -greenlet==3.0.3 -hypothesis==6.45.0 -idna==3.7 -iniconfig==2.0.0 -iso8601==1.1.0 -itsdangerous==2.2.0 -jinja2==3.1.4 -markupsafe==2.1.5 -mock==5.1.0 -opentracing==2.4.0 -packaging==24.1 -peewee==3.17.6 -pluggy==1.5.0 -pony==0.7.17 -protobuf==5.27.2 -pycryptodome==3.20.0 -pydantic==2.8.2 -pydantic-core==2.20.1 -pypika-tortoise==0.1.6 -pytest==8.3.2 -pytest-cov==5.0.0 -pytest-mock==3.14.0 -pytz==2024.1 -requests==2.32.3 -sortedcontainers==2.4.0 -sqlalchemy==2.0.31 -tortoise-orm==0.21.5 -typing-extensions==4.12.2 -urllib3==2.2.2 -werkzeug==3.0.3 -xmltodict==0.13.0 diff --git a/.riot/requirements/1fa807e.txt b/.riot/requirements/1f540f4.txt similarity index 55% rename from .riot/requirements/1fa807e.txt rename to .riot/requirements/1f540f4.txt index ca1c67d95b6..0836dd9eaa2 100644 --- a/.riot/requirements/1fa807e.txt +++ b/.riot/requirements/1f540f4.txt @@ -2,48 +2,46 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --no-annotate --resolver=backtracking .riot/requirements/1fa807e.in +# pip-compile --no-annotate --resolver=backtracking .riot/requirements/1f540f4.in # -attrs==23.2.0 -boto3==1.34.139 -botocore==1.34.139 +attrs==24.2.0 +boto3==1.35.45 +botocore==1.35.45 bytecode==0.15.1 -cattrs==23.2.3 -certifi==2024.7.4 -charset-normalizer==3.3.2 -coverage[toml]==7.5.4 -datadog==0.49.1 -datadog-lambda==6.96.0 -ddsketch==3.0.1 -ddtrace==2.9.2 +certifi==2024.8.30 +charset-normalizer==3.4.0 +coverage[toml]==7.6.1 +datadog==0.50.1 +datadog-lambda==6.99.0 +ddtrace==2.14.4 deprecated==1.2.14 -envier==0.5.2 -exceptiongroup==1.2.1 +envier==0.6.1 +exceptiongroup==1.2.2 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==7.1.0 +idna==3.10 +importlib-metadata==8.4.0 iniconfig==2.0.0 jmespath==1.0.1 mock==5.1.0 -opentelemetry-api==1.26.0 +opentelemetry-api==1.27.0 opentracing==2.4.0 packaging==24.1 pluggy==1.5.0 -protobuf==5.27.2 -pytest==8.2.2 +protobuf==5.28.2 +pytest==8.3.3 pytest-asyncio==0.21.1 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 python-dateutil==2.9.0.post0 requests==2.32.3 -s3transfer==0.10.2 +s3transfer==0.10.3 six==1.16.0 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.0.2 typing-extensions==4.12.2 ujson==5.10.0 -urllib3==1.26.19 +urllib3==1.26.20 wrapt==1.16.0 -xmltodict==0.13.0 -zipp==3.19.2 +xmltodict==0.14.2 +zipp==3.20.2 diff --git a/.riot/requirements/e39f833.txt b/.riot/requirements/6498eb0.txt similarity index 76% rename from .riot/requirements/e39f833.txt rename to .riot/requirements/6498eb0.txt index e71709e9da3..7a42bc79998 100644 --- a/.riot/requirements/e39f833.txt +++ b/.riot/requirements/6498eb0.txt @@ -2,25 +2,23 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --no-annotate --resolver=backtracking .riot/requirements/e39f833.in +# pip-compile --no-annotate --resolver=backtracking .riot/requirements/6498eb0.in # -attrs==23.2.0 +attrs==24.2.0 boto3==1.33.13 botocore==1.33.13 bytecode==0.13.0 -cattrs==23.1.2 -certifi==2024.7.4 -charset-normalizer==3.3.2 +certifi==2024.8.30 +charset-normalizer==3.4.0 coverage[toml]==7.2.7 -datadog==0.49.1 +datadog==0.50.1 datadog-lambda==5.85.0 -ddsketch==3.0.1 -ddtrace==2.9.2 +ddtrace==2.14.4 deprecated==1.2.14 -envier==0.5.2 -exceptiongroup==1.2.1 +envier==0.6.1 +exceptiongroup==1.2.2 hypothesis==6.45.0 -idna==3.7 +idna==3.10 importlib-metadata==6.5.0 iniconfig==2.0.0 jmespath==1.0.1 @@ -42,7 +40,7 @@ six==1.16.0 sortedcontainers==2.4.0 tomli==2.0.1 typing-extensions==4.7.1 -urllib3==1.26.19 +urllib3==1.26.20 wrapt==1.16.0 -xmltodict==0.13.0 +xmltodict==0.14.2 zipp==3.15.0 diff --git a/.riot/requirements/bd5e098.txt b/.riot/requirements/bd5e098.txt new file mode 100644 index 00000000000..5e457c989c4 --- /dev/null +++ b/.riot/requirements/bd5e098.txt @@ -0,0 +1,47 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/bd5e098.in +# +aiosqlite==0.20.0 +annotated-types==0.7.0 +attrs==24.2.0 +blinker==1.8.2 +bytecode==0.15.1 +cattrs==22.2.0 +certifi==2024.8.30 +charset-normalizer==3.4.0 +click==8.1.7 +coverage[toml]==7.6.4 +flask==3.0.3 +hypothesis==6.45.0 +idna==3.10 +iniconfig==2.0.0 +iso8601==2.1.0 +itsdangerous==2.2.0 +jinja2==3.1.4 +markupsafe==3.0.2 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.1 +peewee==3.17.7 +pluggy==1.5.0 +pony==0.7.19 +protobuf==5.28.2 +pycryptodome==3.21.0 +pydantic==2.9.2 +pydantic-core==2.23.4 +pypika-tortoise==0.2.1 +pytest==8.3.3 +pytest-cov==5.0.0 +pytest-mock==3.14.0 +pytz==2024.2 +requests==2.32.3 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +tortoise-orm==0.21.7 +typing-extensions==4.12.2 +urllib3==2.2.3 +werkzeug==3.0.4 +xmltodict==0.14.2 diff --git a/.riot/requirements/edb39c1.txt b/.riot/requirements/c23a971.txt similarity index 76% rename from .riot/requirements/edb39c1.txt rename to .riot/requirements/c23a971.txt index 667e74f25cd..458ab589c40 100644 --- a/.riot/requirements/edb39c1.txt +++ b/.riot/requirements/c23a971.txt @@ -2,25 +2,23 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --no-annotate --resolver=backtracking .riot/requirements/edb39c1.in +# pip-compile --no-annotate --resolver=backtracking .riot/requirements/c23a971.in # -attrs==23.2.0 +attrs==24.2.0 boto3==1.33.13 botocore==1.33.13 bytecode==0.13.0 -cattrs==23.1.2 -certifi==2024.7.4 -charset-normalizer==3.3.2 +certifi==2024.8.30 +charset-normalizer==3.4.0 coverage[toml]==7.2.7 -datadog==0.49.1 +datadog==0.50.1 datadog-lambda==5.85.0 -ddsketch==3.0.1 -ddtrace==2.9.2 +ddtrace==2.14.4 deprecated==1.2.14 -envier==0.5.2 -exceptiongroup==1.2.1 +envier==0.6.1 +exceptiongroup==1.2.2 hypothesis==6.45.0 -idna==3.7 +idna==3.10 importlib-metadata==6.5.0 iniconfig==2.0.0 jmespath==1.0.1 @@ -42,7 +40,7 @@ six==1.16.0 sortedcontainers==2.4.0 tomli==2.0.1 typing-extensions==4.7.1 -urllib3==1.26.19 +urllib3==1.26.20 wrapt==1.16.0 -xmltodict==0.13.0 +xmltodict==0.14.2 zipp==3.15.0 diff --git a/.riot/requirements/d825572.txt b/.riot/requirements/d825572.txt deleted file mode 100644 index 7ce81023285..00000000000 --- a/.riot/requirements/d825572.txt +++ /dev/null @@ -1,49 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/d825572.in -# -aiosqlite==0.17.0 -annotated-types==0.7.0 -attrs==23.2.0 -blinker==1.8.2 -bytecode==0.15.1 -cattrs==22.2.0 -certifi==2024.7.4 -charset-normalizer==3.3.2 -click==8.1.7 -coverage[toml]==7.6.0 -envier==0.5.2 -flask==3.0.3 -greenlet==3.0.3 -hypothesis==6.45.0 -idna==3.7 -iniconfig==2.0.0 -iso8601==1.1.0 -itsdangerous==2.2.0 -jinja2==3.1.4 -markupsafe==2.1.5 -mock==5.1.0 -opentracing==2.4.0 -packaging==24.1 -peewee==3.17.6 -pluggy==1.5.0 -pony==0.7.17 -protobuf==5.27.2 -pycryptodome==3.20.0 -pydantic==2.8.2 -pydantic-core==2.20.1 -pypika-tortoise==0.1.6 -pytest==8.3.2 -pytest-cov==5.0.0 -pytest-mock==3.14.0 -pytz==2024.1 -requests==2.32.3 -sortedcontainers==2.4.0 -sqlalchemy==2.0.31 -tortoise-orm==0.21.5 -typing-extensions==4.12.2 -urllib3==2.2.2 -werkzeug==3.0.3 -xmltodict==0.13.0 diff --git a/.riot/requirements/dd525d9.txt b/.riot/requirements/dd525d9.txt deleted file mode 100644 index 03c376f19df..00000000000 --- a/.riot/requirements/dd525d9.txt +++ /dev/null @@ -1,49 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile --no-annotate --resolver=backtracking .riot/requirements/dd525d9.in -# -attrs==23.2.0 -boto3==1.34.139 -botocore==1.34.139 -bytecode==0.15.1 -cattrs==23.2.3 -certifi==2024.7.4 -charset-normalizer==3.3.2 -coverage[toml]==7.5.4 -datadog==0.49.1 -datadog-lambda==6.96.0 -ddsketch==3.0.1 -ddtrace==2.9.2 -deprecated==1.2.14 -envier==0.5.2 -exceptiongroup==1.2.1 -hypothesis==6.45.0 -idna==3.7 -importlib-metadata==7.1.0 -iniconfig==2.0.0 -jmespath==1.0.1 -mock==5.1.0 -opentelemetry-api==1.26.0 -opentracing==2.4.0 -packaging==24.1 -pluggy==1.5.0 -protobuf==5.27.2 -pytest==8.2.2 -pytest-asyncio==0.21.1 -pytest-cov==5.0.0 -pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-dateutil==2.9.0.post0 -requests==2.32.3 -s3transfer==0.10.2 -six==1.16.0 -sortedcontainers==2.4.0 -tomli==2.0.1 -typing-extensions==4.12.2 -ujson==5.10.0 -urllib3==1.26.19 -wrapt==1.16.0 -xmltodict==0.13.0 -zipp==3.19.2 diff --git a/ddtrace/settings/_core.py b/ddtrace/settings/_core.py index 15964726749..a2c4eb9a295 100644 --- a/ddtrace/settings/_core.py +++ b/ddtrace/settings/_core.py @@ -5,27 +5,44 @@ from typing import Optional # noqa:F401 from typing import Union # noqa:F401 -from envier.env import EnvVariable -from envier.env import _normalized +from envier import Env from ddtrace.internal.telemetry import telemetry_writer -def report_telemetry(env: Any) -> None: - for name, e in list(env.__class__.__dict__.items()): - if isinstance(e, EnvVariable) and not e.private: - env_name = env._full_prefix + _normalized(e.name) - env_val = e(env, env._full_prefix) - raw_val = env.source.get(env_name) - if env_name in env.source and env_val == e._cast(e.type, raw_val, env): +class Config(Env): + """Env-based configuration sub-class for automatic telemetry reporting.""" + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self._report_telemetry() + + def _report_telemetry(self) -> None: + for name, e in type(self).items(recursive=True): + if e.private: + continue + + env_name = e.full_name + + # Get the item value recursively + env_val = self + for p in name.split("."): + env_val = getattr(env_val, p) + + source = "unknown" + if env_name in self.source: source = "env_var" - elif env_val == e.default: - source = "default" else: - source = "unknown" + if env_val == e.default: + source = "default" + telemetry_writer.add_configuration(env_name, env_val, source) +def report_telemetry(env: Env) -> None: + Config._report_telemetry(env) + + def get_config( envs: Union[str, List[str]], default: Any = None, diff --git a/ddtrace/settings/peer_service.py b/ddtrace/settings/peer_service.py index 7bc56849a95..2e0af732c3d 100644 --- a/ddtrace/settings/peer_service.py +++ b/ddtrace/settings/peer_service.py @@ -1,10 +1,8 @@ -import os - from ddtrace.ext import SpanKind from ddtrace.internal.schema import SCHEMA_VERSION from ddtrace.internal.utils.formats import asbool from ddtrace.internal.utils.formats import parse_tags_str -from ddtrace.settings._core import report_telemetry as _report_telemetry +from ddtrace.settings._core import get_config as _get_config class PeerServiceConfig(object): @@ -23,7 +21,7 @@ def __init__(self, set_defaults_enabled=None, peer_service_mapping=None): @property def set_defaults_enabled(self): if self._set_defaults_enabled is None: - env_enabled = asbool(os.getenv("DD_TRACE_PEER_SERVICE_DEFAULTS_ENABLED", default=False)) + env_enabled = _get_config("DD_TRACE_PEER_SERVICE_DEFAULTS_ENABLED", False, asbool) self._set_defaults_enabled = SCHEMA_VERSION == "v1" or (SCHEMA_VERSION == "v0" and env_enabled) return self._set_defaults_enabled @@ -31,11 +29,10 @@ def set_defaults_enabled(self): @property def peer_service_mapping(self): if self._peer_service_mapping is None: - self._unparsed_peer_service_mapping = os.getenv("DD_TRACE_PEER_SERVICE_MAPPING", default="") + self._unparsed_peer_service_mapping = _get_config("DD_TRACE_PEER_SERVICE_MAPPING", "") self._peer_service_mapping = parse_tags_str(self._unparsed_peer_service_mapping) return self._peer_service_mapping _ps_config = PeerServiceConfig() -_report_telemetry(_ps_config) diff --git a/hatch.toml b/hatch.toml index 0baca1fd235..38471028f8f 100644 --- a/hatch.toml +++ b/hatch.toml @@ -9,7 +9,7 @@ dependencies = [ "bandit==1.7.5", "mypy==0.991", "coverage==7.3.0", - "envier==0.5.2", + "envier==0.6.1", "types-docutils==0.19.1.1", "types-protobuf==3.20.4.5", "types-PyYAML==6.0.12.2", @@ -84,7 +84,7 @@ dependencies = [ # copied from library dependencies "protobuf>=3", "typing_extensions", "xmltodict>=0.12", - "envier==0.5.2", + "envier==0.6.1", "opentelemetry-api>=1", "opentracing>=2.0.0", "bytecode", diff --git a/min_compatible_versions.csv b/min_compatible_versions.csv index 4537863f24c..bdc06d83f50 100644 --- a/min_compatible_versions.csv +++ b/min_compatible_versions.csv @@ -61,7 +61,7 @@ elasticsearch7,~=7.13.0 elasticsearch7[async],0 elasticsearch8,~=8.0.1 elasticsearch[async],0 -envier,==0.5.2 +envier,==0.6.1 exceptiongroup,0 faiss-cpu,==1.8.0 falcon,~=3.0 diff --git a/pyproject.toml b/pyproject.toml index df5fbdcdbb2..5add05799c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ dependencies = [ "bytecode>=0.15.0; python_version~='3.12.0'", "bytecode>=0.14.0; python_version~='3.11.0'", "bytecode>=0.13.0; python_version<'3.11'", - "envier~=0.5", + "envier~=0.6.1", "importlib_metadata<=6.5.0; python_version<'3.8'", "legacy-cgi>=2.0.0; python_version>='3.13.0'", "opentelemetry-api>=1", diff --git a/riotfile.py b/riotfile.py index 0d9f66ca925..3f62a0cce06 100644 --- a/riotfile.py +++ b/riotfile.py @@ -213,7 +213,6 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT "tortoise-orm": latest, "peewee": latest, "requests": latest, - "envier": "==0.5.2", "cattrs": "<23.1.1", "protobuf": ">=3", "typing_extensions": latest, @@ -2911,7 +2910,6 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT "datadog-lambda": [">=4.66.0", latest], "pytest-asyncio": "==0.21.1", "pytest-randomly": latest, - "envier": "==0.5.2", }, ), Venv( diff --git a/tests/telemetry/test_writer.py b/tests/telemetry/test_writer.py index bcc3be9e38c..9579f35ce04 100644 --- a/tests/telemetry/test_writer.py +++ b/tests/telemetry/test_writer.py @@ -398,12 +398,23 @@ def test_app_started_event_configuration_override(test_agent_session, run_python {"name": "DD_PROFILING_ENABLE_ASSERTS", "origin": "default", "value": False}, {"name": "DD_PROFILING_ENABLE_CODE_PROVENANCE", "origin": "default", "value": True}, {"name": "DD_PROFILING_ENDPOINT_COLLECTION_ENABLED", "origin": "default", "value": True}, + {"name": "DD_PROFILING_EXPORT_LIBDD_ENABLED", "origin": "default", "value": False}, + {"name": "DD_PROFILING_HEAP_ENABLED", "origin": "env_var", "value": False}, + {"name": "DD_PROFILING_HEAP_SAMPLE_SIZE", "origin": "default", "value": None}, {"name": "DD_PROFILING_IGNORE_PROFILER", "origin": "default", "value": False}, + {"name": "DD_PROFILING_LOCK_ENABLED", "origin": "env_var", "value": False}, + {"name": "DD_PROFILING_LOCK_NAME_INSPECT_DIR", "origin": "default", "value": True}, {"name": "DD_PROFILING_MAX_EVENTS", "origin": "default", "value": 16384}, {"name": "DD_PROFILING_MAX_FRAMES", "origin": "env_var", "value": 512}, {"name": "DD_PROFILING_MAX_TIME_USAGE_PCT", "origin": "default", "value": 1.0}, + {"name": "DD_PROFILING_MEMORY_ENABLED", "origin": "env_var", "value": False}, + {"name": "DD_PROFILING_MEMORY_EVENTS_BUFFER", "origin": "default", "value": 16}, {"name": "DD_PROFILING_OUTPUT_PPROF", "origin": "default", "value": None}, + {"name": "DD_PROFILING_PYTORCH_ENABLED", "origin": "default", "value": False}, + {"name": "DD_PROFILING_PYTORCH_EVENTS_LIMIT", "origin": "default", "value": 1000000}, {"name": "DD_PROFILING_SAMPLE_POOL_CAPACITY", "origin": "default", "value": 4}, + {"name": "DD_PROFILING_STACK_ENABLED", "origin": "env_var", "value": False}, + {"name": "DD_PROFILING_STACK_V2_ENABLED", "origin": "default", "value": False}, {"name": "DD_PROFILING_TAGS", "origin": "default", "value": ""}, {"name": "DD_PROFILING_TIMELINE_ENABLED", "origin": "default", "value": False}, {"name": "DD_PROFILING_UPLOAD_INTERVAL", "origin": "env_var", "value": 10.0}, @@ -446,6 +457,8 @@ def test_app_started_event_configuration_override(test_agent_session, run_python {"name": "DD_TRACE_OTEL_ENABLED", "origin": "env_var", "value": True}, {"name": "DD_TRACE_PARTIAL_FLUSH_ENABLED", "origin": "env_var", "value": False}, {"name": "DD_TRACE_PARTIAL_FLUSH_MIN_SPANS", "origin": "env_var", "value": 3}, + {"name": "DD_TRACE_PEER_SERVICE_DEFAULTS_ENABLED", "origin": "default", "value": False}, + {"name": "DD_TRACE_PEER_SERVICE_MAPPING", "origin": "env_var", "value": "default_service:remapped_service"}, {"name": "DD_TRACE_PROPAGATION_EXTRACT_FIRST", "origin": "default", "value": False}, {"name": "DD_TRACE_PROPAGATION_HTTP_BAGGAGE_ENABLED", "origin": "default", "value": False}, {"name": "DD_TRACE_PROPAGATION_STYLE_EXTRACT", "origin": "env_var", "value": "tracecontext"},