Skip to content

feat: add meaningful logs for export task#666

Merged
adrianviquez merged 2 commits intomainfrom
adrian/adjust-exporter-logs
Jan 21, 2026
Merged

feat: add meaningful logs for export task#666
adrianviquez merged 2 commits intomainfrom
adrian/adjust-exporter-logs

Conversation

@adrianviquez
Copy link
Contributor

@adrianviquez adrianviquez commented Jan 21, 2026

Add/adjust logs for exporter.

https://linear.app/getsentry/issue/CCMRG-2025/add-logs-for-export-task-testing

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.


Note

Improves observability of the owner data export pipeline with structured, contextual logs and consistent telemetry across admin, tasks, and helpers.

  • Adds detailed log.info/error/warning events with extra metadata (e.g., export_id, owner_id, chord_id, counts, sizes) at key stages: orchestrator start/dispatch, SQL export, archive collection, finalization, cleanup
  • Propagates export_id through SQL generation and archive copy paths (ExportContext, generate_full_export/generate_timescale_export, copy_archive_file, tarball helpers) for correlation
  • Reduces noisy logs by suppressing expected "file not found" warnings during archive copy; shifts to structured errors for actual failures
  • Admin action logs when an export is blocked due to an in-progress run and when a new export is initiated

Written by Cursor Bugbot for commit 0c80f15. This will update automatically on new commits. Configure here.

@adrianviquez adrianviquez requested a review from a team January 21, 2026 19:28
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@sentry
Copy link

sentry bot commented Jan 21, 2026

Codecov Report

❌ Patch coverage is 0% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.38%. Comparing base (30b7bba) to head (0c80f15).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/worker/tasks/export_owner_data.py 0.00% 24 Missing ⚠️
...ared/shared/owner_data_export/archive_collector.py 0.00% 9 Missing ⚠️
apps/codecov-api/codecov_auth/admin.py 0.00% 2 Missing ⚠️
...s/shared/shared/owner_data_export/sql_generator.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #666      +/-   ##
==========================================
- Coverage   92.39%   92.38%   -0.01%     
==========================================
  Files        1295     1295              
  Lines       47656    47661       +5     
  Branches     1592     1592              
==========================================
  Hits        44030    44030              
- Misses       3317     3322       +5     
  Partials      309      309              
Flag Coverage Δ
apiunit 96.36% <0.00%> (-0.02%) ⬇️
sharedintegration 37.57% <0.00%> (+0.01%) ⬆️
sharedunit 85.98% <0.00%> (+0.04%) ⬆️
workerintegration 58.10% <0.00%> (-0.04%) ⬇️
workerunit 89.67% <0.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@codecov-notifications
Copy link

codecov-notifications bot commented Jan 21, 2026

Codecov Report

❌ Patch coverage is 0% with 37 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/worker/tasks/export_owner_data.py 0.00% 24 Missing ⚠️
...ared/shared/owner_data_export/archive_collector.py 0.00% 9 Missing ⚠️
apps/codecov-api/codecov_auth/admin.py 0.00% 2 Missing ⚠️
...s/shared/shared/owner_data_export/sql_generator.py 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 21, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing adrian/adjust-exporter-logs (0c80f15) with main (e423dc8)1

Summary

✅ 9 untouched benchmarks

Footnotes

  1. No successful run was found on main (7dfd59b) during the generation of this report, so e423dc8 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@adrianviquez adrianviquez added this pull request to the merge queue Jan 21, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 21, 2026
@adrianviquez adrianviquez added this pull request to the merge queue Jan 21, 2026
Merged via the queue into main with commit c18408c Jan 21, 2026
51 of 53 checks passed
@adrianviquez adrianviquez deleted the adrian/adjust-exporter-logs branch January 21, 2026 23:32
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