open-telemetry / open-telemetry/opentelemetry-cpp-contrib

Nginx not propagating context

Open
#274 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Webserver
Dominant language
Python
Stars
153
Forks
184
Avg merge
2d 9h
Merged PRs (30d)
26

Description

Describe your environment

Hello all,
I was following this blog post: https://opentelemetry.io/blog/2022/instrument-nginx/
But trying the latest version of OTel Nginx instrumentation.

I'm using Nginx to serve fastcgi requests to a wordpress FPM backend.
I'm not sure if my Nginx configuration is wrong, or if the instrumentation is not working.
Would someone be able to give me a hand?

I was expecting Nginx spans to be linked with Wordpress spans, but at the moment they are all orphaned.

I've put together a sample, to make it easier to reproduce.

Steps to reproduce
Just clone this repo:
https://github.com/julianocosta89/Wordpress-FPM_Nginx_OTel

and run:

docker compose up

What is the expected behavior?
I expected to see the context being propagated from Nginx to Wordpress.

What is the actual behavior?
I got traces from Nginx and from Wordpress, but not linked together.

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

Clone the linked Wordpress-FPM_Nginx_OTel reproduction and run docker compose up first. Inspect the Nginx and WordPress trace output and configuration to determine why their spans are orphaned; done means the resulting Nginx and WordPress spans share propagated context.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, nginx, php, wordpress
Domain
backend, networking, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.