Skip to content

Commit 115b9a9

Browse files
committed
add textPayloadKey
Signed-off-by: Chengwei Guo <[email protected]>
1 parent 141001d commit 115b9a9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apis/fluentbit/v1alpha2/plugins/output/stackdriver_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ type Stackdriver struct {
5757
CustomK8sRegex string `json:"customK8sRegex,omitempty"`
5858
// Optional list of comma seperated strings. Setting these fields overrides the Stackdriver monitored resource API values
5959
ResourceLabels []string `json:"resourceLabels,omitempty"`
60+
// the key to used to select the text payload from the record
61+
TextPayloadKey string `json:"textPayloadKey,omitempty"`
6062
}
6163

6264
// Name implement Section() method
@@ -141,5 +143,8 @@ func (o *Stackdriver) Params(sl plugins.SecretLoader) (*params.KVs, error) {
141143
if o.ResourceLabels != nil && len(o.ResourceLabels) > 0 {
142144
kvs.Insert("resource_labels", strings.Join(o.ResourceLabels, ","))
143145
}
146+
if o.TextPayloadKey != "" {
147+
kvs.Insert("text_payload_key", o.TextPayloadKey)
148+
}
144149
return kvs, nil
145150
}

0 commit comments

Comments
 (0)