• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nats-io / nats-server / 21466303623 / 1
85%
main: 85%

Build:
DEFAULT BRANCH: main
Ran 29 Jan 2026 06:07AM UTC
Files 61
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Jan 2026 12:29PM UTC coverage: 84.647% (-0.1%) from 84.752%
21466303623.1

push

github

web-flow
(2.14) [CHANGED] Message Tracing: Do not rewrite `traceparent` header (#7755)

An issue was reported
(https://github.com/nats-io/nats-architecture-and-design/issues/392)
stating that users don't want the `traceparent` header to be changed to
`Xraceparent` by the server (in order to disable tracing) because it may
break their applications that rely on its presence.

The header will no longer be changed, including its case. The
specification (https://www.w3.org/TR/trace-context/#header-name) says:
```
Vendors MUST expect the header in any case (upper, lower, mixed), and
SHOULD send the header name in lowercase.
```

Since it was "SHOULD", we have no obligation to rewrite it in lower
case.

In the ADR issue, it was discussed to add a new header that would
disable tracing (and will leave `traceparent` header name untouched) but
the issue with that is that in a mixed environment (newer and older
servers), the older servers would not know about the new header and
would possibly emit traces when they should not.

The approach in this PR is to add or update the content of
`Nats-Trace-Dest` header to a specific invalid subject ("trace
disabled") instead of changing the `Nats-Trace-Dest` and/or
`traceparent` headers to `Xats-Trace-Dest` and `Xraceparent`.

For newer server, when processing an inbound message that has the
`Nats-Trace-Dest` header set to this specific value, regardless of the
presence of `traceparent` or not, we understand it as a way to disable
tracing, do not report any error and consider the tracing disabled (and
process the message normally).

For older servers, the presence of `Nats-Trace-Dest` takes precedence,
so `traceparent` will be ignored, but since the trace destination is an
invalid NATS subject, the error:

`Destination "trace disabled" is not valid, won't be able to trace
events`

will be logged, and the message will not be traced. It is not ideal that
an error message is printed, but this allows for backward compatibility.
The mes... (continued)

74335 of 87818 relevant lines covered (84.65%)

330269.79 hits per line

Source Files on job 21466303623.1
  • Tree
  • List 61
  • Changed 21
  • Source Changed 3
  • Coverage Changed 21
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 21466303623
  • f27bdf6d on github
  • Prev Job for on main (#21425568901.1)
  • Next Job for on main (#21505038077.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc