Skip to content

Commit

Permalink
fix: add condition to avoid adding it if for some reason already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
tamirdavid1 committed Dec 12, 2024
1 parent 79b47fd commit 7dca4d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion initializer/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,6 @@ def handle_instrumenation_of_sub_processes():
# - The environment override writer is removed
# - Webhook integration is implemented
# - A custom distro creation mechanism is developed
os.environ["PYTHONPATH"] = f"{os.environ['PYTHONPATH']}:/var/odigos/python/opentelemetry/instrumentation/auto_instrumentation"
auto_instrumentation_path = "/var/odigos/python/opentelemetry/instrumentation/auto_instrumentation"
if auto_instrumentation_path not in os.environ["PYTHONPATH"]:
os.environ["PYTHONPATH"] = f"{os.environ['PYTHONPATH']}:{auto_instrumentation_path}"

0 comments on commit 7dca4d6

Please sign in to comment.