From 5efb4fb214e13c63b70bb7bb57ddb5453d3c8e0e Mon Sep 17 00:00:00 2001 From: Chelsea Holland Komlo Date: Wed, 30 Aug 2017 21:18:42 +0000 Subject: [PATCH] add metrics options to client config --- client/config/config.go | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/client/config/config.go b/client/config/config.go index 6ce263eb0..39d50507c 100644 --- a/client/config/config.go +++ b/client/config/config.go @@ -188,6 +188,14 @@ type Config struct { // ACLPolicyTTL is how long we cache policy values for ACLPolicyTTL time.Duration + + // DisableTaggedMetrics determines whether metrics will be displayed via a + // key/value/tag format, or simply a key/value format + DisableTaggedMetrics bool + + // BackwardsCompatibleMetrics determines whether to show methods of + // displaying metrics for older verions, or to only show the new format + BackwardsCompatibleMetrics bool } func (c *Config) Copy() *Config { @@ -205,20 +213,22 @@ func (c *Config) Copy() *Config { // DefaultConfig returns the default configuration func DefaultConfig() *Config { return &Config{ - Version: version.GetVersion(), - VaultConfig: config.DefaultVaultConfig(), - ConsulConfig: config.DefaultConsulConfig(), - LogOutput: os.Stderr, - Region: "global", - StatsCollectionInterval: 1 * time.Second, - TLSConfig: &config.TLSConfig{}, - LogLevel: "DEBUG", - GCInterval: 1 * time.Minute, - GCParallelDestroys: 2, - GCDiskUsageThreshold: 80, - GCInodeUsageThreshold: 70, - GCMaxAllocs: 50, - NoHostUUID: true, + Version: version.GetVersion(), + VaultConfig: config.DefaultVaultConfig(), + ConsulConfig: config.DefaultConsulConfig(), + LogOutput: os.Stderr, + Region: "global", + StatsCollectionInterval: 1 * time.Second, + TLSConfig: &config.TLSConfig{}, + LogLevel: "DEBUG", + GCInterval: 1 * time.Minute, + GCParallelDestroys: 2, + GCDiskUsageThreshold: 80, + GCInodeUsageThreshold: 70, + GCMaxAllocs: 50, + NoHostUUID: true, + DisableTaggedMetrics: false, + BackwardsCompatibleMetrics: false, } }