v4.0.0
This major release makes the following changes to the package:
BREAKING CHANGES
- Node 6 is no longer supported.
- Changes in config options: Users that use the following config options may see changes:
- Config options
contextHeaderBehaviorandignoreContextHeadernow act independently of one another, andignoreContextHeaderis no longer deprecated. The former controls how a sampling decision is made based on incoming context header, and the latter controls whether trace context is propagated to the current request. (#1027) - When initialized with
clsMechanism: 'none', callingTracer#createChildSpanwill potentially result in a warning, as these spans are considered to be uncorrelated. To ensure that warnings do not occur during automatic tracing, disable any plugins that patch modules that create outgoing RPCs. (Use of the custom span APITracer#createChildSpanis not recommended in this configuration -- useRootSpan#createChildSpaninstead.) (#1033)
- Config options
- Changes in the custom span API: APIs that assume a particular format for trace context headers have been modified or removed; in other words, any place where the user would deal with a stringified trace context, they would now deal with a TraceContext object instead. (#1029) This affects three APIs:
Tracer#getResponseTraceContext(input/output has changed from string to TraceContext)Tracer#createRootSpan(input RootSpanOptions now accepts a TraceContext instead of a string in the traceContext field)Span#getTraceContext(output has changed from string to TraceContext)
If you do not use the custom span API or any of the config options above, there should be no breaking changes.
New Features
- Call stacks on traces now show pre-transpiled file/line numbers based on source maps. (#1015)
- Arbitrary tracing policy is now supported: the new config option
tracePolicyallows users to write their own filters for traces, instead of using the built-insamplingRate,contextHeaderBehavior,ignoreMethods, andignoreUrls. (#1027) - Arbitrary HTTP trace header propagation is now supported: the new config option
propagationtakes in an OpenCensusPropagationobject. It defaults to the Stackdriver Trace v1 header format exported by the package@opencensus/propagation-stackdriver; other OpenCensus propagation packages should work as drop-in replacements. (#1029) - Every trace object now contains a trace and span ID, even if they were not sampled. (#1033)
Bug Fixes
- Requests to ignored URLs / with ignored methods no longer affect the frequency of sampled requests (they used to be factored in when sampling, causing un-filtered requests to potentially get sampled out erroneously). (#1018)
Commits
6b427ab fix!: always assign a trace ID to each request (#1033)
23a990a fix(deps): update dependency @google-cloud/common to v2 (#1038)
1e5278b chore(deps): update dependency teeny-request to v4 (#1042)
f6c080d chore(deps): update dependency grpc to v1.21.1 (#1037)
9c38663 chore(deps): update dependency typescript to ~3.5.0 (#1039)
1b18254 chore(deps): update dependency js-green-licenses to v1 (#1041)
8a7588c chore(deps): update dependency axios to ^0.19.0 (#1040)
8383ae2 chore: add node 12 ci job (#1002)
6838cf7 refactor: drop usage of pify (#1034)
2b0a15a chore: drop dependency on jshint (#1035)
d3d0ed9 chore: remove bump and changelog commands (#1036)
87e4d26 refactor: upgrade to gts@1 (#1031)
4c79b4f fix(deps): update dependency @opencensus/propagation-stackdriver to v0.0.13 (#1030)
28ecb16 feat!: support user-specified context header propagation (#1029)
c63bb14 fix(deps): update dependency @google-cloud/datastore to v4 (#1028)
b37aa3d feat!: allow users to specify a trace policy impl (#1027)
e956d45 doc: fix grammar (#1026)
e672b98 refactor: explicitly assign every internal config field (#1021)
244633e fix(deps): update dependency @google-cloud/common to v1 (#1023)
9d3b9e5 fix(deps): update dependency gcp-metadata to v2 (#1022)
1e5c9be chore: stop testing on node 6 in ci (#1024)
42a18a5 test: stop querying google.com (#1020)
9de51ea chore(deps): update dependency standard-version to v6 (#1019)
1832473 fix: Prevent filtered traces from biasing the sample rate (#1018)
2cbf1c2 test: test source map support for stack traces (#1016)
c558455 feat: use source-map-support wrapCallSite to apply source maps to call stacks (#1015)
b06a5bb chore(deps): update dependency grpc to v1.20.3 (#1014)
6b7f923 chore: fix code coverage, drop ncp (#1013)
b6abf76 chore(deps): update dependency retry-axios to v1 (#1003)
98f95e3 build!: upgrade engines field to >=8.10.0 (#1011)