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

Support Postgres log extraction with log_duration disabled #1004

Merged

Conversation

elic-eon
Copy link
Contributor

@elic-eon elic-eon commented Oct 9, 2024

🤔 Why?

Since log_duration does not always default to true, we should be able to extract query history without duration.

🤓 What?

  • Add log_duration_enabled flag to default to false to extract log without duration
  • Add filter_pattern to speed up query log extraction
  • fix skipping execute statement and add testcase

🧪 Tested?

Update unit tests, verified against dev postgres instance.

☑️ Checks

  • My PR contains actual code changes, and I have updated the version number in pyproject.toml.

Copy link

github-actions bot commented Oct 9, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
13066 11694 90% 85% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
metaphor/common/aws.py 92% 🟢
metaphor/common/sql/process_query/process_query.py 90% 🟢
metaphor/postgresql/config.py 100% 🟢
metaphor/postgresql/extractor.py 52% 🟢
TOTAL 84% 🟢

updated for commit: be9f82d by action🐍

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 89.49%. Comparing base (afe14f2) to head (be9f82d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
metaphor/common/aws.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1004      +/-   ##
==========================================
- Coverage   89.50%   89.49%   -0.01%     
==========================================
  Files         200      200              
  Lines       13061    13066       +5     
==========================================
+ Hits        11690    11694       +4     
- Misses       1371     1372       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@elic-eon elic-eon force-pushed the scotthuang/sc-29242/support-postgres-log-without-duration branch from 6535fb1 to 4be973c Compare October 9, 2024 09:03
@elic-eon elic-eon marked this pull request as ready for review October 9, 2024 09:08
@elic-eon elic-eon merged commit e9d5044 into main Oct 9, 2024
6 checks passed
@elic-eon elic-eon deleted the scotthuang/sc-29242/support-postgres-log-without-duration branch October 9, 2024 16:36
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.

3 participants