-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(x/accounts): improve comments (#22339)
(cherry picked from commit 98be2b8) # Conflicts: # api/cosmos/accounts/defaults/lockup/v1/tx.pulsar.go # api/cosmos/accounts/defaults/multisig/v1/multisig.pulsar.go # server/v2/api/telemetry/config.go # simapp/go.mod
- Loading branch information
1 parent
1d727a3
commit b83542c
Showing
11 changed files
with
16,948 additions
and
42 deletions.
There are no files selected for viewing
6,727 changes: 6,727 additions & 0 deletions
6,727
api/cosmos/accounts/defaults/lockup/v1/tx.pulsar.go
Large diffs are not rendered by default.
Oops, something went wrong.
10,097 changes: 10,097 additions & 0 deletions
10,097
api/cosmos/accounts/defaults/multisig/v1/multisig.pulsar.go
Large diffs are not rendered by default.
Oops, something went wrong.
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,61 @@ | ||
package telemetry | ||
|
||
func DefaultConfig() *Config { | ||
return &Config{ | ||
Enable: true, | ||
Address: "localhost:1327", | ||
ServiceName: "", | ||
EnableHostname: false, | ||
EnableHostnameLabel: false, | ||
EnableServiceLabel: false, | ||
PrometheusRetentionTime: 0, | ||
GlobalLabels: nil, | ||
MetricsSink: "", | ||
StatsdAddr: "", | ||
DatadogHostname: "", | ||
} | ||
} | ||
|
||
type Config struct { | ||
// Enable enables the application telemetry functionality. When enabled, | ||
// an in-memory sink is also enabled by default. Operators may also enabled | ||
// other sinks such as Prometheus. | ||
Enable bool `mapstructure:"enable" toml:"enable" comment:"Enable enables the application telemetry functionality. When enabled, an in-memory sink is also enabled by default. Operators may also enabled other sinks such as Prometheus."` | ||
|
||
// Address defines the API server to listen on | ||
Address string `mapstructure:"address" toml:"address" comment:"Address defines the metrics server address to bind to."` | ||
|
||
// Prefixed with keys to separate services | ||
ServiceName string `mapstructure:"service-name" toml:"service-name" comment:"Prefixed with keys to separate services."` | ||
|
||
// Enable prefixing gauge values with hostname | ||
EnableHostname bool `mapstructure:"enable-hostname" toml:"enable-hostname" comment:"Enable prefixing gauge values with hostname."` | ||
|
||
// Enable adding hostname to labels | ||
EnableHostnameLabel bool `mapstructure:"enable-hostname-label" toml:"enable-hostname-label" comment:"Enable adding hostname to labels."` | ||
|
||
// Enable adding service to labels | ||
EnableServiceLabel bool `mapstructure:"enable-service-label" toml:"enable-service-label" comment:"Enable adding service to labels."` | ||
|
||
// PrometheusRetentionTime, when positive, enables a Prometheus metrics sink. | ||
// It defines the retention duration in seconds. | ||
PrometheusRetentionTime int64 `mapstructure:"prometheus-retention-time" toml:"prometheus-retention-time" comment:"PrometheusRetentionTime, when positive, enables a Prometheus metrics sink. It defines the retention duration in seconds."` | ||
|
||
// GlobalLabels defines a global set of name/value label tuples applied to all | ||
// metrics emitted using the wrapper functions defined in telemetry package. | ||
// | ||
// Example: | ||
// [["chain_id", "cosmoshub-1"]] | ||
GlobalLabels [][]string `mapstructure:"global-labels" toml:"global-labels" comment:"GlobalLabels defines a global set of name/value label tuples applied to all metrics emitted using the wrapper functions defined in telemetry package.\n Example:\n [[\"chain_id\", \"cosmoshub-1\"]]"` | ||
|
||
// MetricsSink defines the type of metrics backend to use. | ||
MetricsSink string `mapstructure:"type" toml:"metrics-sink" comment:"MetricsSink defines the type of metrics backend to use. Default is in memory"` | ||
|
||
// StatsdAddr defines the address of a statsd server to send metrics to. | ||
// Only utilized if MetricsSink is set to "statsd" or "dogstatsd". | ||
StatsdAddr string `mapstructure:"statsd-addr" toml:"stats-addr" comment:"StatsdAddr defines the address of a statsd server to send metrics to. Only utilized if MetricsSink is set to \"statsd\" or \"dogstatsd\"."` | ||
|
||
// DatadogHostname defines the hostname to use when emitting metrics to | ||
// Datadog. Only utilized if MetricsSink is set to "dogstatsd". | ||
DatadogHostname string `mapstructure:"datadog-hostname" toml:"data-dog-hostname" comment:"DatadogHostname defines the hostname to use when emitting metrics to Datadog. Only utilized if MetricsSink is set to \"dogstatsd\"."` | ||
} |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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