@contrail/telemetry 2.0.9-alpha-formatting.0 → 2.0.9-alpha-formatting.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.
@@ -114,19 +114,16 @@ function createStdoutStream() {
114
114
  level: 'trace',
115
115
  stream: new stream_1.Writable({
116
116
  write(chunk, _encoding, callback) {
117
- var _a, _b, _c, _d;
117
+ var _a;
118
118
  let line;
119
119
  try {
120
120
  const logRecord = JSON.parse(chunk.toString());
121
- const time = (_a = logRecord.time) !== null && _a !== void 0 ? _a : new Date().toISOString();
122
- const level = (_b = logger_config_1.PINO_LEVEL_TO_NAME[logRecord.level]) !== null && _b !== void 0 ? _b : 'INFO';
123
- const message = (_c = logRecord[semantic_conventions_2.ATTR_LOG_MESSAGE]) !== null && _c !== void 0 ? _c : '';
124
- const requestId = (_d = getLambdaRequestId()) !== null && _d !== void 0 ? _d : '-';
121
+ const message = (_a = logRecord[semantic_conventions_2.ATTR_LOG_MESSAGE]) !== null && _a !== void 0 ? _a : '';
125
122
  const payload = logRecord[semantic_conventions_2.ATTR_LOG_PAYLOAD];
126
123
  const payloadLine = payload && typeof payload === 'object' && Object.keys(payload).length > 0
127
124
  ? `\n${JSON.stringify(payload, null, 2)}`
128
125
  : '';
129
- line = `${time}\t${requestId}\t${level}\t${message}${payloadLine}`;
126
+ line = `${message}${payloadLine}`;
130
127
  }
131
128
  catch {
132
129
  line = chunk.toString().replace(/\n$/, '');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/telemetry",
3
- "version": "2.0.9-alpha-formatting.0",
3
+ "version": "2.0.9-alpha-formatting.1",
4
4
  "description": "Telemetry and monitoring utilities for contrail services",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",