@uoa/lambda-tracing 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/readme.md +6 -3
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -40,7 +40,8 @@ Once the logger has been imported, you can log any info using
|
|
|
40
40
|
logger.info('Hello Logger!');
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
**Logging Levels**
|
|
44
|
+
|
|
44
45
|
At UoA, we have four logging levels available to use. Ordered by decreasing priority, these are:
|
|
45
46
|
|
|
46
47
|
|Level| Logger usage |
|
|
@@ -66,7 +67,8 @@ logger.warn('Will be logged');
|
|
|
66
67
|
logger.error('Will be logged');
|
|
67
68
|
```
|
|
68
69
|
|
|
69
|
-
|
|
70
|
+
**Logging format**
|
|
71
|
+
|
|
70
72
|
By default, logs will be produced in the following format:
|
|
71
73
|
```
|
|
72
74
|
date [thread] level class - [[[traceId,spanId,info]]] message
|
|
@@ -105,7 +107,8 @@ If this header is not passed, it will be randomly generated.
|
|
|
105
107
|
`X-B3-Info` can be any string value to provide extra information in your logs.\
|
|
106
108
|
If this header is not passed, it will be set as `lambdaRequestId:requestId` where `requestId` is the id of the current lambda invocation.
|
|
107
109
|
|
|
108
|
-
|
|
110
|
+
**Header Propagation**
|
|
111
|
+
|
|
109
112
|
To propagate the ```X-B3-TraceId``` and ```X-B3-Info``` headers to other APIs, you can import and use the uoaHttps module:
|
|
110
113
|
```
|
|
111
114
|
const uoaHttps = require('@uoa/lambda-tracing/uoaHttps');
|