Skip to content

Add microsecond precision to quickstart logs#401

Merged
aabmass merged 1 commit intoGoogleCloudPlatform:mainfrom
aabmass:quickstart-us
Apr 22, 2025
Merged

Add microsecond precision to quickstart logs#401
aabmass merged 1 commit intoGoogleCloudPlatform:mainfrom
aabmass:quickstart-us

Conversation

@aabmass
Copy link
Copy Markdown
Collaborator

@aabmass aabmass commented Apr 18, 2025

The python logging datefmt parameter does not support sub-second precision because it calls time.strftime (docs).

Instead of being limited by datefmt, I override the formatTime() function to get microsecond precision.
Screenshot 2025-04-22 at 4 07 10 PM

@aabmass aabmass requested a review from a team as a code owner April 18, 2025 23:05
Comment thread samples/instrumentation-quickstart/gcp_logging.py
@aabmass aabmass enabled auto-merge (squash) April 22, 2025 20:07
@aabmass aabmass merged commit 6bbc2c0 into GoogleCloudPlatform:main Apr 22, 2025
22 checks passed
@aabmass aabmass deleted the quickstart-us branch April 22, 2025 20:42
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