-
Notifications
You must be signed in to change notification settings - Fork 25
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
fix!: metrics fixes, updates, cleanups #338
Merged
Merged
Conversation
This file contains 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
feat(hermes,router): routing metrics improvements refactor: earlier module schema registration
fix(grpc-sdk): metrics reset not reinitializing values Reset value reinitialization is currently not properly implemented for: Database: registered_schemas_total Router: client_routes_total Authentication: logged_in_users_total Check @improve-metrics tags for details. BREAKING CHANGE: Metrics reset endpoints (/metrics/reset) are now POST operations.
fix(database): sequelize adapter missing deleteSchema metric decrement
kkopanidis
approved these changes
Sep 21, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR includes multiple fixes, cleanups and refactors to metrics-related functionality.
To begin with, it introduces the following fixes:
registered_schemas_total
metric increase equality check always failing on schema creationregistered_schemas_total
metric not decreasing on schema deletionregistered_schemas_total
metric lacking multi-instance supportpush_notifications_sent_total
metric only increasing once for multiple concurrent deliveriesconduit_
prefixgetMetric()
missingconduit_
prefixMetric Changes:
admin_routes_total
), while also renaming the corresponding client route counter toclient_routes_total
for consistency.Both of the above now accept a
transport
label for distinguishing betweenrest
,graphql
andsocket
routes.devicesCount
label frompush_notifications_sent_total
metricBreaking Change:
Metrics reset routes have been dropped as that would needlessly complicate value reinitialization for certain stat counters.
I've introduced an optional metric initializer hook (
initializeMetrics()
) inConduitModule
, allowing modules to initialize stat-like values on startup.I implemented that in all of our modules, regardless of whether they need to initialize anything, for clarity.
Things that still need to be improved upon:
Authentication
module'slogged_in_users_total
should be initialized and remain up to date with active logins (based on token validity).What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Metrics reset routes have been dropped as that would needlessly complicate value reinitialization for certain stat counters.
The PR fulfills these requirements:
main
branchfix #xxx
, where "xxx" is the issue number)If adding a new feature, the PR's description includes: