Skip to content

Commit

Permalink
Merge pull request #46 from odigos-io/opamp-support-applications-fork
Browse files Browse the repository at this point in the history
feat: support applications fork
  • Loading branch information
tamirdavid1 authored Dec 5, 2024
2 parents c5086d5 + c446f6f commit 6a48d84
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions initializer/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@
MINIMUM_PYTHON_SUPPORTED_VERSION = (3, 8)

def initialize_components(trace_exporters = None, metric_exporters = None, log_exporters = None , span_processor = None):

# In case of forking, the OpAMP client should be started in the child process.
# e.g when using gunicorn/celery with multiple workers.
os.register_at_fork(
after_in_child=start_opamp_client(threading.Event())
) # pylint: disable=protected-access


resource_attributes_event = threading.Event()
client = None

Expand Down

0 comments on commit 6a48d84

Please sign in to comment.