func()

in pkg/export/export.go [228:251]


func (opts *ExporterOpts) DefaultUnsetFields() {
	if opts.Efficiency.BatchSize == 0 {
		opts.Efficiency.BatchSize = BatchSizeMax
	}
	if opts.Efficiency.ShardCount == 0 {
		opts.Efficiency.ShardCount = DefaultShardCount
	}
	if opts.Efficiency.ShardBufferSize == 0 {
		opts.Efficiency.ShardBufferSize = DefaultShardBufferSize
	}

	if opts.Endpoint == "" {
		opts.Endpoint = "monitoring.googleapis.com:443"
	}
	if opts.Compression == "" {
		opts.Compression = CompressionNone
	}
	if opts.MetricTypePrefix == "" {
		opts.MetricTypePrefix = MetricTypePrefix
	}
	if opts.UserAgentMode == "" {
		opts.UserAgentMode = "unspecified"
	}
}