saltstack / saltstack/salt

[BUG] salt.utils.tracing eagerly imports OpenTelemetry when tracing is disabled

Open
#69,855 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug memory-leak
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description

salt.utils.tracing unconditionally imports the entire OpenTelemetry SDK at module load, even when tracing.enabled is False (the default). Because salt.utils.tracing is imported by every daemon entry point (salt.master, salt.minion, salt.channel.client, salt.channel.server, salt.utils.event, salt.netapi.rest_cherrypy.app, salt.utils.reactor), every Python process in the salt fleet pays the OTel import cost, regardless of whether tracing is used.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the salt.utils.tracing module and checking how it is imported by salt.master, salt.minion, salt.channel.client, salt.channel.server, salt.utils.event, salt.netapi.rest_cherrypy.app, and salt.utils.reactor. Done means the OpenTelemetry SDK is not imported when tracing.enabled is False, while tracing remains available when enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.