This repository was archived by the owner on Jan 21, 2026. It is now read-only.
v2.8.0
2018-05-02, Version 2.8.0 (Beta), @kjin
This version adds a new configuration option, as well as minor changes to the custom span API.
Notable Changes
Configuration
- A new configuration option
config.clsMechanismis available, which can be used to disable automatic trace context propagation across asynchronous boundaries. This options should be considered advanced usage, and is intended to be used in conjunction with the custom span API with all automatic tracing plugins disabled. - A potential issue was fixed where the value of
config.projectIdisn't used if the environment variableGCLOUD_PROJECTis set to an empty string.
Custom Span API
- A new function
createChildSpanhas been added toSpanDataobjects passed to the user withrunInRootSpan(the type of which is nowRootSpanData). Under normal circumstances, creating a root span usingmyRootSpan.createChildSpanshould be identical totraceApi.createChildSpanwhenmyRootSpanis automatically detected from CLS to be the current root span. This API was added to facilitate creating child spans when the current root span can no longer be auto-detected from CLS because the user disabled CLS throughconfig.clsMechanism. - When a function passed to
traceApi.runInRootSpanortraceApi.wrapthrows, the trace context will correctly be reset to its original value before the function was run.
Commits
- [
d0009ff5ea] - feat: add rootSpan.createChildSpan and change none CLS semantics (#731) (Kelvin Jin) #731 - [
6e46ed1772] - chore: start running ci for node 10 (#729) (Kelvin Jin) #729 - [
5d000e95e2] - feat: allow "disabling" cls, and relax requirements for creating root spans (#728) (Kelvin Jin) #728 - [
edb8135a79] - fix: restore context when a function run with a given context throws (#727) (Kelvin Jin) #727 - [
132db9b058] - fix: class-ify cls implementations (#708) (Kelvin Jin) #708 - [
395a0c7b2e] - chore(package): update ts-node to version 6.0.0 (#726) (greenkeeper[bot]) #726 - [
d0337fa7b0] - fix: fix log messages and ignore falsey env vars (#724) (Kelvin Jin) #724 - [
e5a4d765d2] - test: fix system test (#723) (Kelvin Jin) #723