Skip to content

Conversation

@jj22ee
Copy link
Contributor

@jj22ee jj22ee commented Jul 30, 2025

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@jj22ee jj22ee requested a review from a team as a code owner July 30, 2025 19:12
@jj22ee jj22ee changed the title Add Compressed Console Log Record Exporter for Lambda Environment Add Compact Console Log Record Exporter for Lambda Environment Jul 30, 2025
@jj22ee
Copy link
Contributor Author

jj22ee commented Jul 30, 2025

Note the main difference in this new compact exporter is that we just print via console.log instead of console.dir in upstream.

-    for (const logRecord of logRecords) {
-      console.dir(this._exportInfo(logRecord), { depth: 3 });
-    }
+    for (const logRecord of logRecords) {
+      console.log(this['_exportInfo'](logRecord));
+    }

@jj22ee
Copy link
Contributor Author

jj22ee commented Jul 30, 2025

In testing, I see that Lambda will prepend its RequestID to the logged log.
image

I suppose we'd want this removed...

@jj22ee
Copy link
Contributor Author

jj22ee commented Jul 30, 2025

Now when using process.stdout.write instead of console.log, the Lambda Request ID is ignored in the log.
image

wangzlei
wangzlei previously approved these changes Jul 30, 2025
@jj22ee jj22ee merged commit cec6770 into aws-observability:main Jul 31, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants