Skip to content

Commit be50fd7

Browse files
authored
fix(logging): remove unneeded forksafe unregister to avoid unneeded logging (#12193)
Removes unneeded forksafe unregister hook. The unregister is not needed, because we never actually registered the hook to begin with. ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
1 parent 17c60dd commit be50fd7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

ddtrace/internal/remoteconfig/worker.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from typing import List # noqa:F401
33

44
from ddtrace.internal import agent
5-
from ddtrace.internal import atexit
65
from ddtrace.internal import forksafe
76
from ddtrace.internal import periodic
87
from ddtrace.internal.logger import get_logger
@@ -132,9 +131,6 @@ def disable(self, join=False):
132131
if self.status == ServiceStatus.STOPPED:
133132
return
134133

135-
forksafe.unregister(self.reset_at_fork)
136-
atexit.unregister(self.disable)
137-
138134
self.stop(join=join)
139135

140136
def _stop_service(self, *args, **kwargs):
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
fixes:
3+
- |
4+
logging: Resolves an an unneeded info log being logged on process exit
5+
due to a forksafe hook being unregistered that was never registered to begin with.

0 commit comments

Comments
 (0)