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

[DOP-18570] Implement SparkMetricsRecorder #302

Merged
merged 1 commit into from
Aug 9, 2024
Merged

Conversation

dolfinus
Copy link
Member

@dolfinus dolfinus commented Aug 6, 2024

Change Summary

  • Implement SparkListener which captures events for object chain execution -> job -> stage -> task. It also records raw metrics for tasks, stages and executions od metric values.
  • Implement SparkMetricsCollector which converts raw metrics to a set of models with human-readable representation of metric values.
  • Add unit tests for metric classes.
  • Add integration tests for all classes and methods which may read or write dataframe. Tests are a bit flaky, as metrics sometimes appear long after execution was finished.

DBWriter and FileDFWriter will be modified in a separated PR: #303

Related issue number

Checklist

  • Commit message and PR title is comprehensive
  • Keep the change as small as possible
  • Unit and integration tests for the changes exist
  • Tests pass on CI and coverage does not decrease
  • Documentation reflects the changes where applicable
  • docs/changelog/next_release/<pull request or issue id>.<change type>.rst file added describing change
    (see CONTRIBUTING.rst for details.)
  • My PR is ready to review.

Copy link

codecov bot commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 96.47436% with 22 lines in your changes missing coverage. Please review.

Project coverage is 94.96%. Comparing base (c4a9cb8) to head (8b5c8b0).
Report is 58 commits behind head on develop.

Files with missing lines Patch % Lines
onetl/_metrics/listener/stage.py 86.95% 3 Missing and 3 partials ⚠️
onetl/_metrics/listener/execution.py 92.53% 4 Missing and 1 partial ⚠️
onetl/_metrics/listener/job.py 93.10% 3 Missing and 1 partial ⚠️
onetl/_metrics/listener/listener.py 96.38% 1 Missing and 2 partials ⚠️
onetl/_metrics/listener/task.py 96.07% 2 Missing ⚠️
onetl/_metrics/driver.py 95.65% 0 Missing and 1 partial ⚠️
onetl/_metrics/listener/base.py 97.29% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #302      +/-   ##
===========================================
+ Coverage    94.84%   94.96%   +0.12%     
===========================================
  Files          210      225      +15     
  Lines         8200     8823     +623     
  Branches      1413     1507      +94     
===========================================
+ Hits          7777     8379     +602     
- Misses         299      312      +13     
- Partials       124      132       +8     

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

@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from 333a880 to 959e20b Compare August 6, 2024 18:59
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from 959e20b to 359c24b Compare August 7, 2024 16:29
@dolfinus dolfinus added the ci:skip-changelog Add this label to skip changelog file check label Aug 7, 2024
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from 359c24b to e852cfc Compare August 7, 2024 16:37
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from e852cfc to 5c068cd Compare August 7, 2024 16:51
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from 5c068cd to 75ab1fb Compare August 7, 2024 19:34
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from 75ab1fb to d7865b4 Compare August 7, 2024 19:57
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from d7865b4 to b5561b2 Compare August 7, 2024 20:15
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from b5561b2 to 42870a5 Compare August 7, 2024 20:16
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from 42870a5 to a553290 Compare August 7, 2024 20:25
@dolfinus dolfinus marked this pull request as ready for review August 7, 2024 20:33
@dolfinus dolfinus changed the title [DOP-18570] Collect Spark metrics in DBWriter and FileDFWriter [DOP-18570] Implement SparkMetricsRecorder Aug 8, 2024
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from 2361388 to a80f5bf Compare August 8, 2024 08:26
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from a80f5bf to b7e460c Compare August 8, 2024 09:09
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from b7e460c to 2ce8ec9 Compare August 8, 2024 09:56
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from 2ce8ec9 to 7f8e766 Compare August 8, 2024 10:09
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from 7f8e766 to b622e64 Compare August 8, 2024 10:57
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from b622e64 to 5b7a67a Compare August 8, 2024 11:07
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from 5b7a67a to a81fdb7 Compare August 8, 2024 11:11
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from a81fdb7 to 16e8af4 Compare August 8, 2024 11:26
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from 16e8af4 to 3bd2410 Compare August 8, 2024 11:34
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from 3bd2410 to 58b4622 Compare August 8, 2024 11:47
@dolfinus dolfinus force-pushed the feature/DOP-18570 branch from 58b4622 to edded80 Compare August 8, 2024 13:20
@dolfinus dolfinus merged commit abff632 into develop Aug 9, 2024
38 checks passed
@dolfinus dolfinus deleted the feature/DOP-18570 branch August 9, 2024 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:skip-changelog Add this label to skip changelog file check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants