This repository was archived by the owner on Oct 3, 2023. It is now read-only.
This repository was archived by the owner on Oct 3, 2023. It is now read-only.
B3 Propagation UX issues #340
Closed
Description
Working on support for propagation via OpenCensus propagation modules in Stackdriver Trace (googleapis/cloud-trace-nodejs#950), I ran into a couple of issues:
- Because
strictNullChecks
is turned off,B3Format
does an unsafe non-null cast (source). The result is that consumers of this propagation library will get invalid values whenever the B3 header is not set, and crash if they depended on these values being valid (which is a reasonable assumption for TS users). - Not a behavioral bug but there are a few superfluous falsiness checks in
B3Format
such as forgetter
andsetter
. - The B3 propagation module exports a different interface than the Stackdriver propagation module. Stackdriver propagation exports an implementation of
Propagation
, while B3 propagation exports a class constructor. I believe they should all export the former rather than the latter.
These issues may also exist for other propagation mechanisms, I only looked at B3 in particular.