-
Notifications
You must be signed in to change notification settings - Fork 25
Metrics refactor #221
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
Merged
Merged
Metrics refactor #221
Changes from 18 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
6a16c3d
Added basic metrics interfaces, a metrics factory and an implementati…
Rentacookie 82385bd
Added creation and initialization helper methods for the existing rep…
Rentacookie c655147
Updated service runners to initialize the MetricsEngine and the exist…
Rentacookie 437bd7a
Updated replication modules to use the MetricsEngine instead of the o…
Rentacookie 4ab4112
Updated tests
Rentacookie 8e9f75b
Updated Opentelemetry dependencies
Rentacookie 5dc7599
Remove unused import
Rentacookie 816081a
Merge branch 'main' into metrics-refactor
Rentacookie 9495d49
Branch update fixes
Rentacookie 419e08b
Merge branch 'main' into metrics-refactor
Rentacookie d239244
Added changeset
Rentacookie d7fab45
Moved metric enums to types package
Rentacookie bf0e399
Updated changeset
Rentacookie 0398ec8
Merge branch 'main' into metrics-refactor
Rentacookie 04b3d4f
Export metric types as named export
Rentacookie 60801d9
Keep original metrics type export as well
Rentacookie ec896f3
Made metric enum names consistent
Rentacookie 247ff3a
Merge branch 'main' into metrics-refactor
Rentacookie 58a021a
Merge branch 'main' into metrics-refactor
Rentacookie e0bea96
Merge branch 'main' into metrics-refactor
Rentacookie 38744b3
Merge branch 'main' into metrics-refactor
Rentacookie c1ccf73
Merge branch 'main' into metrics-refactor
Rentacookie 9c8ed97
Move metrics registration to service-core
Rentacookie ed8e76e
Removed unused dependencies in service package
Rentacookie 233b8b2
Merge branch 'main' into metrics-refactor
Rentacookie af146f6
Only set up data replication metrics recorder for PostgresModule when…
Rentacookie 511ff94
Merge branch 'main' into metrics-refactor
Rentacookie 7c358b8
Moved the prometheus metrics port from an env variable to the collect…
Rentacookie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
'@powersync/service-module-postgres-storage': minor | ||
'@powersync/service-module-mongodb-storage': minor | ||
'@powersync/service-core-tests': minor | ||
'@powersync/service-module-postgres': minor | ||
'@powersync/service-module-mongodb': minor | ||
'@powersync/service-core': minor | ||
'@powersync/service-module-mysql': minor | ||
'@powersync/service-types': minor | ||
--- | ||
|
||
Refactored Metrics to use a MetricsEngine which is telemetry framework agnostic. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
import { container } from '@powersync/lib-services-framework'; | ||
import { test_utils } from '@powersync/service-core-tests'; | ||
import { beforeAll, beforeEach } from 'vitest'; | ||
import { METRICS_HELPER } from '@powersync/service-core-tests'; | ||
|
||
beforeAll(async () => { | ||
// Executes for every test file | ||
container.registerDefaults(); | ||
await test_utils.initMetrics(); | ||
}); | ||
|
||
beforeEach(async () => { | ||
await test_utils.resetMetrics(); | ||
METRICS_HELPER.resetMetrics(); | ||
}); |
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
import { container } from '@powersync/lib-services-framework'; | ||
import { test_utils } from '@powersync/service-core-tests'; | ||
import { METRICS_HELPER } from '@powersync/service-core-tests'; | ||
import { beforeEach } from 'node:test'; | ||
import { beforeAll } from 'vitest'; | ||
|
||
beforeAll(async () => { | ||
// Executes for every test file | ||
container.registerDefaults(); | ||
|
||
await test_utils.initMetrics(); | ||
}); | ||
|
||
beforeEach(async () => { | ||
await test_utils.resetMetrics(); | ||
METRICS_HELPER.resetMetrics(); | ||
}); |
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.