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

omitempty for tags that marshal into zero val but should be nil #687

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion httpbp/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type ClientConfig struct {
MaxErrorReadAhead int `yaml:"limitErrorReading"`
MaxConnections int `yaml:"maxConnections"`
CircuitBreaker *breakerbp.Config `yaml:"circuitBreaker"`
RetryOptions []retry.Option
RetryOptions []retry.Option `yaml:"-"`

SecretsStore SecretsStore
HeaderbpSigningKeyPath string
Expand Down
2 changes: 1 addition & 1 deletion log/sentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type SentryConfig struct {
// List of regexp strings that will be used to match against event's message
// and if applicable, caught errors type and value.
// If the match is found, then a whole event will be dropped.
IgnoreErrors []string `yaml:"ignoreErrors"`
IgnoreErrors []string `yaml:"ignoreErrors,omitempty"`

// FlushTimeout is the timeout to be used to call sentry.Flush when closing
// the Closer returned by InitSentry.
Expand Down
2 changes: 1 addition & 1 deletion metricsbp/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Config struct {
Endpoint string `yaml:"endpoint"`

// Tags are the base tags that will be applied to all metrics.
Tags Tags `yaml:"tags"`
Tags Tags `yaml:"tags,omitempty"`

// HistogramSampleRate is the fraction of histograms (including timings) that
// you want to send to your metrics backend.
Expand Down
2 changes: 1 addition & 1 deletion thriftbp/client_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ type ClientPoolConfig struct {
// This includes the optional pool stats.
//
// Deprecated: We no longer emit any statsd metrics so this has no effect.
MetricsTags metricsbp.Tags `yaml:"metricsTags"`
MetricsTags metricsbp.Tags `yaml:"metricsTags,omitempty"`

// DefaultRetryOptions is the list of retry.Options to apply as the defaults
// for the Retry middleware.
Expand Down