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

Flyway migration events #2021

Merged
merged 2 commits into from
Aug 23, 2024
Merged

Flyway migration events #2021

merged 2 commits into from
Aug 23, 2024

Conversation

jtduffy
Copy link
Contributor

@jtduffy jtduffy commented Aug 22, 2024

Resolves #2008

This instrumentation module will report migration report events to New Relic during Flyway migrations initiated via code, including when running properly configured Spring/Spring Boot applications.

The following Flyway migration events are reported:

  • Event.AFTER_EACH_MIGRATE
  • Event.AFTER_EACH_MIGRATE_ERROR
  • Event.AFTER_EACH_UNDO
  • Event.AFTER_EACH_UNDO_ERROR

The custom event type name is FlywayMigration, with the following attributes:

  • migrationSuccess: true if the migration was successful
  • migrationFilePhysicalLocation: Path/filename of the migration script
  • migrationChecksum: Calculated checksum of the migration
  • migrationVersion: Version portion of the migration script filename
  • migrationScriptName: Name portion of the migration script filename
  • migrationEvent: The underlying Flyway migration event

@jtduffy jtduffy requested a review from a team August 22, 2024 12:02
@codecov-commenter
Copy link

codecov-commenter commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.61%. Comparing base (41f8d7c) to head (db738df).
Report is 9 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2021      +/-   ##
============================================
- Coverage     70.61%   70.61%   -0.01%     
+ Complexity     9873     9872       -1     
============================================
  Files           829      829              
  Lines         39915    39915              
  Branches       6077     6077              
============================================
- Hits          28186    28184       -2     
- Misses         9001     9002       +1     
- Partials       2728     2729       +1     

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

@jtduffy jtduffy merged commit 7495da1 into main Aug 23, 2024
111 checks passed
@jtduffy jtduffy deleted the flyway-events branch August 23, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Spring - Emit events for flyway based DB migrations
3 participants