diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a805200b890..c39dbc5ee2d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -165,6 +165,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Client Breaking Changes * (x/distribution) [#17657](https://github.com/cosmos/cosmos-sdk/pull/17657) Deprecate `CommunityPool` and `FundCommunityPool` rpc methods. Use x/protocolpool module's rpc methods instead. +* (x/gov) [#17910](https://github.com/cosmos/cosmos-sdk/pull/17910) remove telemetry for counting votes and proposals ## [v0.50.0-rc.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.0-rc.1) - 2023-09-25 diff --git a/x/gov/keeper/msg_server.go b/x/gov/keeper/msg_server.go index cdc48a830398..bd624b61fc7d 100644 --- a/x/gov/keeper/msg_server.go +++ b/x/gov/keeper/msg_server.go @@ -4,14 +4,10 @@ import ( "context" "encoding/json" "fmt" - "strconv" - - "github.com/hashicorp/go-metrics" "cosmossdk.io/errors" "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -99,8 +95,6 @@ func (k msgServer) SubmitProposal(goCtx context.Context, msg *v1.MsgSubmitPropos "submit proposal", ) - defer telemetry.IncrCounter(1, govtypes.ModuleName, "proposal") - votingStarted, err := k.Keeper.AddDeposit(ctx, proposal.Id, proposer, msg.GetInitialDeposit()) if err != nil { return nil, err @@ -192,14 +186,6 @@ func (k msgServer) Vote(ctx context.Context, msg *v1.MsgVote) (*v1.MsgVoteRespon return nil, err } - defer telemetry.IncrCounterWithLabels( - []string{govtypes.ModuleName, "vote"}, - 1, - []metrics.Label{ - telemetry.NewLabel("proposal_id", strconv.FormatUint(msg.ProposalId, 10)), - }, - ) - return &v1.MsgVoteResponse{}, nil } @@ -244,14 +230,6 @@ func (k msgServer) VoteWeighted(ctx context.Context, msg *v1.MsgVoteWeighted) (* return nil, err } - defer telemetry.IncrCounterWithLabels( - []string{govtypes.ModuleName, "vote"}, - 1, - []metrics.Label{ - telemetry.NewLabel("proposal_id", strconv.FormatUint(msg.ProposalId, 10)), - }, - ) - return &v1.MsgVoteWeightedResponse{}, nil } @@ -272,14 +250,6 @@ func (k msgServer) Deposit(goCtx context.Context, msg *v1.MsgDeposit) (*v1.MsgDe return nil, err } - defer telemetry.IncrCounterWithLabels( - []string{govtypes.ModuleName, "deposit"}, - 1, - []metrics.Label{ - telemetry.NewLabel("proposal_id", strconv.FormatUint(msg.ProposalId, 10)), - }, - ) - if votingStarted { ctx.EventManager().EmitEvent( sdk.NewEvent(