feat(dbi): Add severity parsing and fix multiline/timestamp for PostgreSQL server logs#2209
Open
JayPolanco wants to merge 1 commit into
Open
feat(dbi): Add severity parsing and fix multiline/timestamp for PostgreSQL server logs#2209JayPolanco wants to merge 1 commit into
JayPolanco wants to merge 1 commit into
Conversation
Contributor
Binary Size Reportlinux/amd64
Notable changes:
linux/arm64
windows/amd64
Investigating size changesUse go-size-analyzer to compare binaries: GOEXPERIMENT=jsonv2 go install github.com/Zxilly/go-size-analyzer/cmd/gsa@latest
gsa diff --old <baseline-binary> --new <new-binary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the issue
DBI (Database Insights) server-logs filelog receiver had three issues:
timeUnixNanowas 0)Additionally, there was a gosnowflake/dbus dependency leak from contrib.
Description of changes
WithSeverityPatternoption to filelog translator84054ba42340to fix gosnowflake/dbus leakLicense
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Tests
TestTranslator_WithTimestampAndSeverityfor filelog translatorTestDbiTranslateServerLogs_FilelogConfigfor DBI translatorseverityNumber,severityText, andattributes.severityLeak fixed
Created a bash script that does:
Also manually ran:
CloudWatch Log Output
ERROR log:
{ "timeUnixNano": 1784329491691000000, "severityNumber": 17, "severityText": "ERROR", "body": "2026-07-17 23:04:51.691 UTC testdb postgres [21991]ERROR: relation \"nonexistent_table_12345\" does not exist at character 15", "attributes": { "timestamp": "2026-07-17 23:04:51.691 UTC", "severity": "ERROR" } }LOG (regular) log:
{ "timeUnixNano": 1784329520159000000, "severityNumber": 9, "severityText": "LOG", "body": "2026-07-17 23:05:20.159 UTC testdb postgres [22079]LOG: duration: 200.869 ms statement: SELECT pg_sleep(0.2);", "attributes": { "timestamp": "2026-07-17 23:05:20.159 UTC", "severity": "LOG" } }Requirements
make fmtandmake fmt-shmake lint