Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Correction for timestamp and instrumentation record severity fields format #1328

Merged
merged 3 commits into from
Sep 3, 2022

Conversation

losalex
Copy link
Contributor

@losalex losalex commented Sep 2, 2022

It seems that timestamp format for log records printed to stdout are in wrong format - the right format is defined here: timestamp-processing. Worth mentioning that changing this format should be safe despite a fact that StructuredJson defined as external - it is used internally and I believe it is safe to change format of timestamp.
Also instrumentation record was setting severity as number and since it should be with DEFAULT severity, removing it from instrumentation record.

Related to # 1266 🦕

@losalex losalex requested review from a team as code owners September 2, 2022 23:36
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: logging Issues related to the googleapis/nodejs-logging API. labels Sep 2, 2022
Copy link
Contributor

@daniel-sanche daniel-sanche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple comments/sugg

src/entry.ts Outdated Show resolved Hide resolved
src/utils/common.ts Outdated Show resolved Hide resolved
test/entry.ts Outdated Show resolved Hide resolved
test/entry.ts Outdated Show resolved Hide resolved
test/entry.ts Show resolved Hide resolved
src/entry.ts Show resolved Hide resolved
Copy link
Contributor

@daniel-sanche daniel-sanche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest considering using RFC3339 instead of this format, and possibly expanding the tests, but overall LGTM as is

Opened 1329 for this suggestion. I believe the only benefit of this is readability for raw JSON payload printed to stdout and/or HTTP/S, hence making this P3.

@losalex losalex added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 3, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 3, 2022
@losalex losalex merged commit 057431b into main Sep 3, 2022
@losalex losalex deleted the losalex/fix-cleanup branch September 3, 2022 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/nodejs-logging API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants