Skip to content

Commit 9eb44c6

Browse files
committed
Reverting the changes
Co-authored-by: Suryanarayana Peri <suryanarayana.peri@fmr.com> Signed-off-by: Rahul Kumar <Rahul.Kumar@fmr.com>
1 parent 697f98c commit 9eb44c6

File tree

1 file changed

+5
-5
lines changed
  • instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics

1 file changed

+5
-5
lines changed

instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
from opentelemetry.metrics import CallbackOptions, Observation, get_meter
9393
from opentelemetry.sdk.util import get_dict_as_key
9494

95-
_logger = logging.getLogger(__name__)
95+
logger = logging.getLogger(__name__)
9696

9797

9898
_DEFAULT_CONFIG = {
@@ -356,16 +356,16 @@ def _instrument(self, **kwargs):
356356
)
357357

358358
if "process.runtime.gc_count" in self._config and self._python_implementation != "pypy":
359+
logger.warning(
360+
"The process.runtime.gc_count metric won't be collected because the interpreter is PyPy"
361+
)
359362
self._meter.create_observable_counter(
360363
name=f"process.runtime.{self._python_implementation}.gc_count",
361364
callbacks=[self._get_runtime_gc_count],
362365
description=f"Runtime {self._python_implementation} GC count",
363366
unit="bytes",
364367
)
365-
else:
366-
_logger.warning(
367-
"The process.runtime.gc_count metric won't be collected because the interpreter is PyPy"
368-
)
368+
369369

370370
if "process.runtime.thread_count" in self._config:
371371
self._meter.create_observable_up_down_counter(

0 commit comments

Comments
 (0)