diff --git a/ddtrace/profiling/collector/__init__.py b/ddtrace/profiling/collector/__init__.py index ec89d401fc8..3520e0f026d 100644 --- a/ddtrace/profiling/collector/__init__.py +++ b/ddtrace/profiling/collector/__init__.py @@ -77,5 +77,5 @@ def _create_capture_sampler(collector): @attr.s class CaptureSamplerCollector(Collector): - capture_pct = attr.ib(factory=attr_utils.from_env("DD_PROFILING_CAPTURE_PCT", 1.0, float)) # type: ignore[arg-type] + capture_pct = attr.ib(factory=attr_utils.from_env("DD_PROFILING_CAPTURE_PCT", 1.0, float)) _capture_sampler = attr.ib(default=attr.Factory(_create_capture_sampler, takes_self=True), init=False, repr=False) diff --git a/ddtrace/profiling/collector/_lock.py b/ddtrace/profiling/collector/_lock.py index 5fc087a7a3a..14059adc48b 100644 --- a/ddtrace/profiling/collector/_lock.py +++ b/ddtrace/profiling/collector/_lock.py @@ -183,7 +183,7 @@ def __get__(self, instance, owner=None): class LockCollector(collector.CaptureSamplerCollector): """Record lock usage.""" - nframes = attr.ib(factory=attr_utils.from_env("DD_PROFILING_MAX_FRAMES", 64, int)) # type: ignore[arg-type] + nframes = attr.ib(factory=attr_utils.from_env("DD_PROFILING_MAX_FRAMES", 64, int)) endpoint_collection_enabled = attr.ib( factory=attr_utils.from_env("DD_PROFILING_ENDPOINT_COLLECTION_ENABLED", True, formats.asbool) ) diff --git a/ddtrace/profiling/collector/memalloc.py b/ddtrace/profiling/collector/memalloc.py index bbb954d2c25..dce965e2a88 100644 --- a/ddtrace/profiling/collector/memalloc.py +++ b/ddtrace/profiling/collector/memalloc.py @@ -92,10 +92,10 @@ class MemoryCollector(collector.PeriodicCollector): factory=attr_utils.from_env( "_DD_PROFILING_MEMORY_EVENTS_BUFFER", _DEFAULT_MAX_EVENTS, - int, # type: ignore[arg-type] + int, ) ) - max_nframe = attr.ib(factory=attr_utils.from_env("DD_PROFILING_MAX_FRAMES", 64, int)) # type: ignore[arg-type] + max_nframe = attr.ib(factory=attr_utils.from_env("DD_PROFILING_MAX_FRAMES", 64, int)) heap_sample_size = attr.ib(type=int, factory=_get_default_heap_sample_size) ignore_profiler = attr.ib(factory=attr_utils.from_env("DD_PROFILING_IGNORE_PROFILER", False, formats.asbool)) diff --git a/ddtrace/profiling/exporter/http.py b/ddtrace/profiling/exporter/http.py index 16ad2e10f6e..59af75d11df 100644 --- a/ddtrace/profiling/exporter/http.py +++ b/ddtrace/profiling/exporter/http.py @@ -48,7 +48,7 @@ class PprofHTTPExporter(pprof.PprofExporter): # Do not use the default agent timeout: it is too short, the agent is just a unbuffered proxy and the profiling # backend is not as fast as the tracer one. timeout = attr.ib( - factory=attr_utils.from_env("DD_PROFILING_API_TIMEOUT", 10.0, float), # type: ignore[arg-type] + factory=attr_utils.from_env("DD_PROFILING_API_TIMEOUT", 10.0, float), type=float, ) service = attr.ib(default=None, type=typing.Optional[str]) diff --git a/ddtrace/profiling/scheduler.py b/ddtrace/profiling/scheduler.py index 6bafc9a60d6..505520d84dd 100644 --- a/ddtrace/profiling/scheduler.py +++ b/ddtrace/profiling/scheduler.py @@ -20,9 +20,7 @@ class Scheduler(periodic.PeriodicService): recorder = attr.ib() exporters = attr.ib() before_flush = attr.ib(default=None, eq=False) - _interval = attr.ib( - factory=attr_utils.from_env("DD_PROFILING_UPLOAD_INTERVAL", 60.0, float) # type: ignore[arg-type] - ) + _interval = attr.ib(factory=attr_utils.from_env("DD_PROFILING_UPLOAD_INTERVAL", 60.0, float)) _configured_interval = attr.ib(init=False) _last_export = attr.ib(init=False, default=None, eq=False)