Skip to content

Commit

Permalink
Merge branch 'main' into sqlalchemy-db-statement-comment-opt-in
Browse files Browse the repository at this point in the history
  • Loading branch information
tammy-baylis-swi authored Jan 2, 2025
2 parents b6970b3 + 3e394a4 commit 0709012
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#3100](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3100))
- Add support to database stability opt-in in `_semconv` utilities and add tests
([#3111](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3111))
- `opentelemetry-instrumentation-system-metrics` Add `py.typed` file to enable PEP 561
([#3132](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3132))
- `opentelemetry-opentelemetry-sqlite3` Add `py.typed` file to enable PEP 561
([#3133](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3133))
- `opentelemetry-instrumentation-falcon` add support version to v4
([#3086](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3086))
- add support to Python 3.13
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,18 @@
---
"""

from __future__ import annotations

import gc
import logging
import os
import sys
import threading
from platform import python_implementation
from typing import Collection, Dict, Iterable, List, Optional
from typing import Any, Collection, Iterable

import psutil

# FIXME Remove this pylint disabling line when Github issue is cleared
# pylint: disable=no-name-in-module
from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
from opentelemetry.instrumentation.system_metrics.package import _instruments
from opentelemetry.instrumentation.system_metrics.version import __version__
Expand All @@ -96,7 +96,7 @@
_logger = logging.getLogger(__name__)


_DEFAULT_CONFIG = {
_DEFAULT_CONFIG: dict[str, list[str] | None] = {
"system.cpu.time": ["idle", "user", "system", "irq"],
"system.cpu.utilization": ["idle", "user", "system", "irq"],
"system.memory.usage": ["used", "free", "cached"],
Expand Down Expand Up @@ -129,8 +129,8 @@
class SystemMetricsInstrumentor(BaseInstrumentor):
def __init__(
self,
labels: Optional[Dict[str, str]] = None,
config: Optional[Dict[str, List[str]]] = None,
labels: dict[str, str] | None = None,
config: dict[str, list[str] | None] | None = None,
):
super().__init__()
if config is None:
Expand Down Expand Up @@ -176,7 +176,7 @@ def __init__(
def instrumentation_dependencies(self) -> Collection[str]:
return _instruments

def _instrument(self, **kwargs):
def _instrument(self, **kwargs: Any):
# pylint: disable=too-many-branches
meter_provider = kwargs.get("meter_provider")
self._meter = get_meter(
Expand Down Expand Up @@ -408,7 +408,7 @@ def _instrument(self, **kwargs):
description="Number of file descriptors in use by the process.",
)

def _uninstrument(self, **__):
def _uninstrument(self, **kwargs: Any):
pass

def _get_open_file_descriptors(
Expand Down

0 comments on commit 0709012

Please sign in to comment.