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

Add unknown message metric. #368

Merged
merged 3 commits into from
Feb 1, 2023

Conversation

dzmitryhil
Copy link
Contributor

@dzmitryhil dzmitryhil commented Jan 27, 2023

Example:

# HELP unknown_message unknown_message
# TYPE unknown_message counter
unknown_message{msg_name="/coreum.asset.ft.v1.MsgIssue"} 1

This change is Reviewable

@dzmitryhil dzmitryhil marked this pull request as ready for review January 27, 2023 12:36
miladz68
miladz68 previously approved these changes Jan 27, 2023
Copy link
Contributor

@miladz68 miladz68 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @silverspase, @wojtek-coreum, and @ysv)

Copy link
Contributor

@ysv ysv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @dzmitryhil, @silverspase, and @wojtek-coreum)


x/deterministicgas/config.go line 48 at r1 (raw file):

	cfg.gasByMsg = map[string]gasByMsgFunc{
		// asset/ft
		//MsgType(&assetfttypes.MsgIssue{}):               constantGasFunc(70000),

ok, but pls rollback it before merging to master)


x/deterministicgas/config.go line 152 at r1 (raw file):

	// In the future other approach could be to return third boolean parameter
	// identifying if message is known and report unknown messages to monitoring.
	reportUnknownMessageMetric(MsgType(msg))

are u going to add this to grafana in a next crust PR also ?


x/deterministicgas/config.go line 240 at r1 (raw file):

func reportUnknownMessageMetric(msgName string) {
	metrics.IncrCounterWithLabels([]string{"unknown_message"}, 1, []metrics.Label{

shouldn't it be deterministic_gas_unknown_message ?
Because in general this message is know but unknown only for determ gas module

Copy link
Contributor Author

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @silverspase, @wojtek-coreum, and @ysv)


x/deterministicgas/config.go line 48 at r1 (raw file):

Previously, ysv (Yaroslav Savchuk) wrote…

ok, but pls rollback it before merging to master)

Updated.


x/deterministicgas/config.go line 152 at r1 (raw file):

Previously, ysv (Yaroslav Savchuk) wrote…

are u going to add this to grafana in a next crust PR also ?

No need to add it to the grafana, since such dashboard will be always empty. What I can do is to add it as allert. does it make sense?


x/deterministicgas/config.go line 240 at r1 (raw file):

Previously, ysv (Yaroslav Savchuk) wrote…

shouldn't it be deterministic_gas_unknown_message ?
Because in general this message is know but unknown only for determ gas module

Agree, updated.

@dzmitryhil dzmitryhil requested a review from ysv January 30, 2023 09:03
Copy link
Collaborator

@wojtek-coreum wojtek-coreum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 4 unresolved discussions (waiting on @dzmitryhil, @miladz68, @silverspase, and @ysv)

a discussion (no related file):
Is this PR really needed? We have unit test which verifies that all the messages are handled. So this condition is just impossible.


Copy link
Contributor

@miladz68 miladz68 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @dzmitryhil, @silverspase, and @ysv)

Copy link
Contributor Author

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @silverspase, @wojtek-coreum, and @ysv)

a discussion (no related file):

Previously, wojtek-coreum (Wojtek) wrote…

Is this PR really needed? We have unit test which verifies that all the messages are handled. So this condition is just impossible.

I also have such dought. Let's discuss today.


@ysv ysv requested a review from wojtek-coreum January 30, 2023 12:06
Copy link
Contributor

@ysv ysv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @silverspase and @wojtek-coreum)


x/deterministicgas/config.go line 152 at r1 (raw file):

Previously, dzmitryhil (Dzmitry Hil) wrote…

No need to add it to the grafana, since such dashboard will be always empty. What I can do is to add it as allert. does it make sense?

alert yes

Copy link
Contributor Author

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @silverspase, @wojtek-coreum, and @ysv)

a discussion (no related file):

Previously, dzmitryhil (Dzmitry Hil) wrote…

I also have such dought. Let's discuss today.

@ysv what about that question?


Copy link
Contributor

@ysv ysv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @silverspase and @wojtek-coreum)

a discussion (no related file):

Previously, dzmitryhil (Dzmitry Hil) wrote…

@ysv what about that question?

lets discuss after the daily
Adde to my notes


Copy link
Collaborator

@wojtek-coreum wojtek-coreum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @silverspase)

Copy link
Collaborator

@wojtek-coreum wojtek-coreum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @silverspase)

@dzmitryhil dzmitryhil merged commit 26b03a7 into master Feb 1, 2023
@dzmitryhil dzmitryhil deleted the dzmitryhil/unknown-message-type-to-monitoring branch February 1, 2023 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants