-
Notifications
You must be signed in to change notification settings - Fork 13
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
chore: active orders observability TODOs #469
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
da9ed54
fix: active orders overflow bug
p0mvn 8ab9921
chore: active orders observability TODOs
p0mvn 441a784
updates
p0mvn 490f4c7
lint
p0mvn f70e401
Merge remote-tracking branch 'upstream/v25.x' into roman/add-observab…
deividaspetraitis 346d95f
chore: active orders observability TODOs
deividaspetraitis 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 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 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 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,56 @@ | ||
package telemetry | ||
|
||
import "github.com/prometheus/client_golang/prometheus" | ||
|
||
var ( | ||
// sqs_orderbook_usecase_get_active_orders_error_total | ||
// | ||
// counter that measures the number of errors that occur during getting active orders in orderbook usecase | ||
// | ||
// Has the following labels: | ||
// * contract - the address of the orderbook contract | ||
// * address - address of the user wallet | ||
// * err - the error message occurred | ||
GetActiveOrdersErrorMetricName = "sqs_orderbook_usecase_get_active_orders_error_total" | ||
|
||
// sqs_orderbook_usecase_get_tick_by_id_not_found_total | ||
// | ||
// counter that measures the number of times a tick is not found by id in orderbook usecase | ||
GetTickByIDNotFoundMetricName = "sqs_orderbook_usecase_get_tick_by_id_not_found_total" | ||
|
||
// sqs_orderbook_usecase_create_limit_order_error_total | ||
// | ||
// counter that measures the number of errors that occur during creating limit order in orderbook | ||
// | ||
// Has the following labels: | ||
// * order - the order from orderbook that was attempted to be created as a limit order | ||
// * err - the error message occurred | ||
CreateLimitOrderErrorMetricName = "sqs_orderbook_usecase_create_limit_order_error_total" | ||
|
||
GetActiveOrdersErrorCounter = prometheus.NewCounter( | ||
prometheus.CounterOpts{ | ||
Name: GetActiveOrdersErrorMetricName, | ||
Help: "counter that measures the number of errors that occur during retrieving active orders from orderbook contract", | ||
}, | ||
) | ||
|
||
GetTickByIDNotFoundCounter = prometheus.NewCounter( | ||
prometheus.CounterOpts{ | ||
Name: GetTickByIDNotFoundMetricName, | ||
Help: "counter that measures the number of not found ticks by ID that occur during retrieving active orders from orderbook contract", | ||
}, | ||
) | ||
|
||
CreateLimitOrderErrorCounter = prometheus.NewCounter( | ||
prometheus.CounterOpts{ | ||
Name: CreateLimitOrderErrorMetricName, | ||
Help: "counter that measures the number errors that occur during creating a limit order orderbook from orderbook order", | ||
}, | ||
) | ||
) | ||
|
||
func init() { | ||
prometheus.MustRegister(GetActiveOrdersErrorCounter) | ||
prometheus.MustRegister(GetTickByIDNotFoundCounter) | ||
prometheus.MustRegister(CreateLimitOrderErrorCounter) | ||
} |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would introducing Orderbook module level telemetry package help to lower conginitive load comparing of global one? I see following benefits:
telemetry.GetTickByIDNotFoundCounter.Inc()
, no need long names, for exampleSQSIngestHandlerProcessOrderbookPoolErrorCounter
cc @p0mvn