Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
Add a timeout knob to control stackdriver exporter behavior. (#999)
Browse files Browse the repository at this point in the history
* Add a timeout knob to control stackdriver exporter behavior.

* Actually make use of the new knob.
  • Loading branch information
yegle authored Sep 17, 2020
1 parent 8b4c1d5 commit b4f95b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/observability/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,5 @@ type StackdriverConfig struct {
ReportingInterval time.Duration `env:"STACKDRIVER_REPORTING_INTERVAL, default=2m"`
BundleDelayThreshold time.Duration `env:"STACKDRIVER_BUNDLE_DELAY_THRESHOLD, default=2s"`
BundleCountThreshold uint `env:"STACKDRIVER_BUNDLE_COUNT_THRESHOLD, default=50"`
Timeout time.Duration `env:"STACKDRIVER_TIMEOUT, default=5s"`
}
1 change: 1 addition & 0 deletions pkg/observability/stackdriver.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func NewStackdriver(ctx context.Context, config *StackdriverConfig) (Exporter, e
ProjectID: projectID,
ReportingInterval: config.ReportingInterval,
BundleDelayThreshold: config.BundleDelayThreshold,
Timeout: config.Timeout,
BundleCountThreshold: int(config.BundleCountThreshold),
MonitoredResource: monitoredResource,
DefaultMonitoringLabels: &stackdriver.Labels{},
Expand Down

0 comments on commit b4f95b7

Please sign in to comment.