0.12.0 • Published 2 years ago
@withjoy/telemetry v0.12.0
@withjoy/telemetry
Telemetry support for logging and analytics.
Publishing
To publish a new version of this module,
- do not up-version on your development branch
- merge your fixes into
develop
- from the
develop
branch,- version-stamp the "next release" section of 'CHANGELOG.md'
- leave an empty "next release" section behind
git commit -m 'updating CHANGELOG.md'
to develop- up-version & publish the module, as below:
# the `npm shrinkwrap` for npm@3 isn't adequate -- npm@6 does the trick
nvm use 10
npm version patch # or whatever is suitable
# TODO: integrate into CircleCI
# @see 'sdk-js.git'
npm publish
git push
git push --tags
Testing
npm run test
Header Propagation
The telemetry library attempts to appropriately identify the requestId associated with an incoming request. When sending an http request the x-joy-client-header
value should be used to properly establish the requestId
and ensure compatability with future iterations of the Telemetry library.
Order of precedence to establish requestId
- Preserve
requestId
in the telemetry context. - Extract
x-joy-request-id
request header value. - Extract
client-request-id
orclientrequestId
request header value. // For mobile integrations - Generate new value to use as
requestId
Environment Variables
As processed by deriveTelemetryConfigFromEnvironment
Name | Purpose | Default |
---|---|---|
JOY_CONFIG_LE_LEVEL | logging threshold for LogEntries; @see TelemetryLevel | 10 ('info') |
JOY_CONFIG_LE_TOKEN_SERVER | LogEntries API Token | (blank => LogEntries disabled) |
JOY_SERVICE_ENV | the logged "Service environment" | (blank) |
LOG_SILENT | "true" to disable all logging, including internal | (blank => false) |
LOG_CONSOLE | "true" to enable 'human-friendly' logging | (blank => false) |
LOG_LEVEL | logging threshold for console ; @see TelemetryLevel | -1 (even lower than 'trace' = everything) |
STDOUT_LOG | "true" to enable JSON logging | (blank => false) |
JOY_CONFIG_SEGMENT_WRITE_KEY | Segment write key | (blank => false) |
1.2.2
2 years ago
1.3.0
2 years ago
1.2.1
2 years ago
0.12.0
2 years ago
1.2.0
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.0
2 years ago
0.11.0
2 years ago
0.10.1
2 years ago
0.10.0
2 years ago
0.9.1
2 years ago
0.9.0
3 years ago
0.8.0
4 years ago
0.7.1
4 years ago
0.7.0
5 years ago
0.6.0
5 years ago
0.5.0
5 years ago
0.4.3
5 years ago
0.4.2
5 years ago
0.4.1
5 years ago
0.4.0
5 years ago
0.3.1
5 years ago
0.3.0
5 years ago
0.2.0
6 years ago
0.1.0
6 years ago
0.0.2
8 years ago
0.0.1
8 years ago