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

nginx span shorter than upstream server span

Open
#459 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

instrumentation:nginx
Dominant language
Python
Stars
153
Forks
184
Avg merge
2d 9h
Merged PRs (30d)
26

Description

Describe your environment Describe any aspect of your environment relevant to the problem, including your platform, build system, version numbers of installed dependencies, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main branch.

nginx-ingress-controller on k8s, opentelemetry enabled
backend nodejs service in same k8s cluster, opentelemetry enabled

Steps to reproduce
setup an env as per above

What is the expected behavior?
that the nginx span is a little longer than the upstream backend span, accounting for the network hop and what not

What is the actual behavior?
its often exactly the same length (e.g. both are 500ms) or even more bizarre, sometimes the nginx span is shorter by a few ms

image

Additional context
Wondering if it has to do with where the span starts and ends within this codebase

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

No file, test, or entry point is named in the report. First reproduce the timing difference in an nginx-ingress-controller and Kubernetes setup with OpenTelemetry enabled, then trace where the nginx and upstream spans begin and end. Done means the span-duration behavior is explained and covered by an appropriate regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, nginx, nodejs
Domain
infrastructure, 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.