open-telemetry / open-telemetry/opentelemetry-python

conflicting information about fork-safety of BatchSpanProcessor

Open
#4,759 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
2.6k
Forks
1k
Avg merge
4d 15h
Merged PRs (30d)
19

Description

Describe your environment

gunicorn+gevent

What happened?

We are trying to figure out how to add instrumentation while adding the minimum amount of code that we will need to maintain across multiple applications.

Steps to Reproduce

The opentelemetry-python documentation claims that "The BatchSpanProcessor is not fork-safe and doesn't work well with application servers (Gunicorn, uWSGI) which are based on the pre-fork web server model.". The opentelemetry.io website claims that Traces (but not Metrics) export work fine for Gunicorn with multiple workers.

Which is it? This looks inconsistent.

Expected Result

These two pages should be consistent and not look inconsistent.

Actual Result

N/A

Additional context

Could you please update either or both pages to be consistent. If they are already consistent, please make them less confusing so the it does not look inconsistent.

Would you like to implement a fix?

None

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

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 docs/examples/fork-process-model and the linked opentelemetry.io zero-code Python troubleshooting page, then compare their statements about BatchSpanProcessor, Gunicorn, and worker processes. Confirm the intended fork-safety guidance with the relevant maintainers or existing documentation context. Done means the two pages give consistent, unambiguous guidance.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.