Skip to content

Commit 81e2472

Browse files
committed
add some default setting mentions in doc
1 parent b905490 commit 81e2472

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docs/api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Following is the supported API format for prometheus encode:
3434
buckets: histogram buckets
3535
valueScale: scale factor of the value (MetricVal := FlowVal / Scale)
3636
prefix: prefix added to each metric name
37-
expiryTime: time duration of no-flow to wait before deleting prometheus data item
37+
expiryTime: time duration of no-flow to wait before deleting prometheus data item (default: 2m)
3838
maxMetrics: maximum number of metrics to report (default: unlimited)
3939
</pre>
4040
## Kafka encode API
@@ -458,8 +458,8 @@ Following is the supported API format for writing metrics to an OpenTelemetry co
458458
flatten: list fields to be flattened
459459
buckets: histogram buckets
460460
valueScale: scale factor of the value (MetricVal := FlowVal / Scale)
461-
pushTimeInterval: how often should metrics be sent to collector:
462-
expiryTime: time duration of no-flow to wait before deleting data item
461+
pushTimeInterval: how often should metrics be sent to collector (default: 20s)
462+
expiryTime: time duration of no-flow to wait before deleting data item (default: 2m)
463463
</pre>
464464
## OpenTelemetry Traces API
465465
Following is the supported API format for writing traces to an OpenTelemetry collector:

pkg/api/encode_otlp.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ type EncodeOtlpMetrics struct {
3030
*OtlpConnectionInfo `json:",inline" doc:"OpenTelemetry connection info; includes:"`
3131
Prefix string `yaml:"prefix,omitempty" json:"prefix,omitempty" doc:"prefix added to each metric name"`
3232
Metrics MetricsItems `yaml:"metrics,omitempty" json:"metrics,omitempty" doc:"list of metric definitions, each includes:"`
33-
PushTimeInterval Duration `yaml:"pushTimeInterval,omitempty" json:"pushTimeInterval,omitempty" doc:"how often should metrics be sent to collector:"`
34-
ExpiryTime Duration `yaml:"expiryTime,omitempty" json:"expiryTime,omitempty" doc:"time duration of no-flow to wait before deleting data item"`
33+
PushTimeInterval Duration `yaml:"pushTimeInterval,omitempty" json:"pushTimeInterval,omitempty" doc:"how often should metrics be sent to collector (default: 20s)"`
34+
ExpiryTime Duration `yaml:"expiryTime,omitempty" json:"expiryTime,omitempty" doc:"time duration of no-flow to wait before deleting data item (default: 2m)"`
3535
}
3636

3737
type OtlpConnectionInfo struct {

pkg/api/encode_prom.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type PromEncode struct {
2626
*PromConnectionInfo `json:",inline,omitempty" doc:"Prometheus connection info (optional); includes:"`
2727
Metrics MetricsItems `yaml:"metrics,omitempty" json:"metrics,omitempty" doc:"list of prometheus metric definitions, each includes:"`
2828
Prefix string `yaml:"prefix,omitempty" json:"prefix,omitempty" doc:"prefix added to each metric name"`
29-
ExpiryTime Duration `yaml:"expiryTime,omitempty" json:"expiryTime,omitempty" doc:"time duration of no-flow to wait before deleting prometheus data item"`
29+
ExpiryTime Duration `yaml:"expiryTime,omitempty" json:"expiryTime,omitempty" doc:"time duration of no-flow to wait before deleting prometheus data item (default: 2m)"`
3030
MaxMetrics int `yaml:"maxMetrics,omitempty" json:"maxMetrics,omitempty" doc:"maximum number of metrics to report (default: unlimited)"`
3131
}
3232

0 commit comments

Comments
 (0)