Skip to content

Commit 4a4071b

Browse files
authored
Document Loki client config (#1088)
Fixes #1071
1 parent 63558c4 commit 4a4071b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ Following is the supported API format for writing to loki:
318318
labels: map of record fields to be used as labels
319319
staticLabels: map of common labels to set on each flow
320320
ignoreList: map of record fields to be removed from the record
321-
clientConfig: clientConfig
321+
clientConfig: Loki client configuration, which follows the same structure as the Prometheus HTTP client config described here: https://pkg.go.dev/github.com/prometheus/common/config#HTTPClientConfig
322322
timestampLabel: label to use for time indexing
323323
timestampScale: timestamp units scale (e.g. for UNIX = 1s)
324324
format: the format of each line: printf (writes using golang's default map printing), fields (writes one key and value field per line) or json (default)

pkg/api/write_loki.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type WriteLoki struct {
3737
Labels []string `yaml:"labels,omitempty" json:"labels,omitempty" doc:"map of record fields to be used as labels"`
3838
StaticLabels model.LabelSet `yaml:"staticLabels,omitempty" json:"staticLabels,omitempty" doc:"map of common labels to set on each flow"`
3939
IgnoreList []string `yaml:"ignoreList,omitempty" json:"ignoreList,omitempty" doc:"map of record fields to be removed from the record"`
40-
ClientConfig *promConfig.HTTPClientConfig `yaml:"clientConfig,omitempty" json:"clientConfig,omitempty" doc:"clientConfig"`
40+
ClientConfig *promConfig.HTTPClientConfig `yaml:"clientConfig,omitempty" json:"clientConfig,omitempty" doc:"Loki client configuration, which follows the same structure as the Prometheus HTTP client config described here: https://pkg.go.dev/github.com/prometheus/common/config#HTTPClientConfig"`
4141
TimestampLabel model.LabelName `yaml:"timestampLabel,omitempty" json:"timestampLabel,omitempty" doc:"label to use for time indexing"`
4242
// TimestampScale provides the scale in time of the units from the timestamp
4343
// E.g. UNIX timescale is '1s' (one second) while other clock sources might have

0 commit comments

Comments
 (0)