Skip to content

Commit

Permalink
mod,x-pack/filebeat/input/cel: update mito dependency
Browse files Browse the repository at this point in the history
This brings in improvments in the collection extension behaviour and
support for context.Context in the HTTP extension.

2f0f2875 lib: add HTTPWithContext cel.EnvOption
fa5b7a0f lib: allow specification of dotted path elements in collate and drop
  • Loading branch information
efd6 committed Dec 7, 2022
1 parent 4bb0e13 commit 296d5b6
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 74 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ https://github.com/elastic/beats/compare/v8.2.0\...main[Check the HEAD diff]
- Fix PANW handling of messages with event.original already set. {issue}33829[33829] {pull}33830[33830]
- Rename identity as identity_name when the value is a string in Azure Platform Logs. {pull}33654[33654]
- Fix input cancellation handling when HTTP client does not support contexts. {issue}33962[33962] {pull}33968[33968]
- Update mito CEL extension library to v0.0.0-20221207004749-2f0f2875e464 {pull}33974[33974]

*Heartbeat*
- Fix broken zip URL monitors. NOTE: Zip URL Monitors will be removed in version 8.7 and replaced with project monitors. {pull}33723[33723]
Expand Down
4 changes: 2 additions & 2 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12988,11 +12988,11 @@ limitations under the License.

--------------------------------------------------------------------------------
Dependency : github.com/elastic/mito
Version: v0.0.0-20221025013803-2ab0322317ce
Version: v0.0.0-20221207004749-2f0f2875e464
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/LICENSE:


Apache License
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ require (
github.com/elastic/elastic-agent-shipper-client v0.4.0
github.com/elastic/elastic-agent-system-metrics v0.4.5-0.20220927192933-25a985b07d51
github.com/elastic/go-elasticsearch/v8 v8.2.0
github.com/elastic/mito v0.0.0-20221025013803-2ab0322317ce
github.com/elastic/mito v0.0.0-20221207004749-2f0f2875e464
github.com/elastic/toutoumomoma v0.0.0-20221026030040-594ef30cb640
github.com/google/cel-go v0.12.5
github.com/googleapis/gax-go/v2 v2.5.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,8 @@ github.com/elastic/gopacket v1.1.20-0.20211202005954-d412fca7f83a h1:8WfL/X6fK11
github.com/elastic/gopacket v1.1.20-0.20211202005954-d412fca7f83a/go.mod h1:riddUzxTSBpJXk3qBHtYr4qOhFhT6k/1c0E3qkQjQpA=
github.com/elastic/gosigar v0.14.2 h1:Dg80n8cr90OZ7x+bAax/QjoW/XqTI11RmA79ZwIm9/4=
github.com/elastic/gosigar v0.14.2/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs=
github.com/elastic/mito v0.0.0-20221025013803-2ab0322317ce h1:SoiSsz4ZB6WshNBGr8LrjZWsOjWsV8yJ4/ebcBx9ckk=
github.com/elastic/mito v0.0.0-20221025013803-2ab0322317ce/go.mod h1:wT2Gr9P4Ascfb7D+Pomb9TPfN++QrU8AIYFQDgCJi+I=
github.com/elastic/mito v0.0.0-20221207004749-2f0f2875e464 h1:16SML3MWc23Q5nXlVwVBCtZYHO4Hhgy6KKLkQ9dMozc=
github.com/elastic/mito v0.0.0-20221207004749-2f0f2875e464/go.mod h1:wT2Gr9P4Ascfb7D+Pomb9TPfN++QrU8AIYFQDgCJi+I=
github.com/elastic/ristretto v0.1.1-0.20220602190459-83b0895ca5b3 h1:ChPwRVv1RR4a0cxoGjKcyWjTEpxYfm5gydMIzo32cAw=
github.com/elastic/ristretto v0.1.1-0.20220602190459-83b0895ca5b3/go.mod h1:RAy2GVV4sTWVlNMavv3xhLsk18rxhfhDnombTe6EF5c=
github.com/elastic/sarama v1.19.1-0.20220310193331-ebc2b0d8eef3 h1:FzA0/n4iMt8ojGDGRoiFPSHFvvdVIvxOxyLtiFnrLBM=
Expand Down
130 changes: 65 additions & 65 deletions x-pack/filebeat/docs/inputs/input-cel.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ The field should be an array, but in the case of an error condition in the CEL p

<2> If `cursor` is present it must be either be a single object or an array with the same length as events; each element _i_ of the `cursor` will be the details for obtaining the events at and beyond event _i_ in the `events` array. If the `cursor` is a single object it is will be the details for obtaining events after the last event in the `events` array and will only be retained on successful publication of all the events in the `events` array.

<3> If `rate_limit` is present it must be a map with numeric fields `rate` and `burst`. The `rate_limit` field may also have a string `error` field and other fields which will be logged. If it has an `error` field, the `rate` and `burst` will not be used to set rate limit behavior. The https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#Limit[Limit], and https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#OktaRateLimit[Okta Rate Limit policy] and https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#DraftRateLimit[Draft Rate Limit policy] documentation show how to construct this field.
<3> If `rate_limit` is present it must be a map with numeric fields `rate` and `burst`. The `rate_limit` field may also have a string `error` field and other fields which will be logged. If it has an `error` field, the `rate` and `burst` will not be used to set rate limit behavior. The https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#Limit[Limit], and https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#OktaRateLimit[Okta Rate Limit policy] and https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#DraftRateLimit[Draft Rate Limit policy] documentation show how to construct this field.

<4> The evaluation is repeated with the new state, after removing the events field, if the "want_more" field is present and true, and a non-zero events array is returned.

Expand All @@ -138,70 +138,70 @@ This will include any sensitive or secret information kept in the `state` object

As noted above the `cel` input provides function, macro and global variables to extend the language.

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#Collections[Collections]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Collate[Collate]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Drop[Drop]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Drop_Empty[Drop Empty]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Flatten[Flatten]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Max[Max]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Min[Min]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-With[With]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-With_Replace[With Replace]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-With_Update[With Update]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#Crypto[Crypto]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Base64[Base64]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Base64_Raw[Base64 Raw]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Hex[Hex]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-SHA_1[SHA-1]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-SHA_256[SHA-256]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-HMAC[HMAC]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-UUID[UUID]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#File[File]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Dir[Dir]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-File[File]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#HTTP[HTTP]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-HEAD[HEAD]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-GET[GET]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-GET_Request[GET Request]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-POST[POST]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-POST_Request[POST Request]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Request[Request]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Do_Request[Do Request]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Parse_URL[Parse URL]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Format_URL[Format URL]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Parse_Query[Parse Query]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Format_Query[Format Query]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#File[File] — the file extension is initialized with MIME handlers for "application/gzip", https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#NDJSON["application/x-ndjson"] and https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#Zip["application/zip"].
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Encode_JSON[Encode JSON]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Decode_JSON[Decode JSON]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Decode_JSON_Stream[Decode JSON Stream]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#Limit[Limit] — the rate limit extension is initialized with https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#OktaRateLimit[Okta (as "okta")] and the https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#DraftRateLimit[Draft Rate Limit (as "draft")] policies.
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Rate_Limit[Rate Limit]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#MIME[MIME] — the MIME extension is initialized with MIME handlers for "application/gzip", https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#NDJSON["application/x-ndjson"] and https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#Zip["application/zip"].
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-MIME[MIME]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#Regexp[Regexp] — the regular expression extension is initialized with the patterns specified in the user input configuration via the `regexp` field.
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-RE_Match[RE Match]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-RE_Find[RE Find]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-RE_Find_All[RE Find All]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-RE_Find_Submatch[RE Find Submatch]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-RE_Find_All_Submatch[RE Find All Submatch]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-RE_Replace_All[RE Replace All]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#Time[Time]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Format[Format]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Parse_Time[Parse Time]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Global_Variables[Global Variables]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#Try[Try]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Try[Try]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221025013803-2ab0322317ce/lib#hdr-Is_Error[Is Error]
* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#Collections[Collections]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Collate[Collate]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Drop[Drop]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Drop_Empty[Drop Empty]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Flatten[Flatten]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Max[Max]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Min[Min]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-With[With]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-With_Replace[With Replace]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-With_Update[With Update]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#Crypto[Crypto]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Base64[Base64]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Base64_Raw[Base64 Raw]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Hex[Hex]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-SHA_1[SHA-1]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-SHA_256[SHA-256]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-HMAC[HMAC]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-UUID[UUID]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#File[File]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Dir[Dir]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-File[File]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#HTTP[HTTP]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-HEAD[HEAD]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-GET[GET]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-GET_Request[GET Request]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-POST[POST]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-POST_Request[POST Request]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Request[Request]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Do_Request[Do Request]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Parse_URL[Parse URL]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Format_URL[Format URL]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Parse_Query[Parse Query]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Format_Query[Format Query]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#File[File] — the file extension is initialized with MIME handlers for "application/gzip", https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#NDJSON["application/x-ndjson"] and https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#Zip["application/zip"].
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Encode_JSON[Encode JSON]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Decode_JSON[Decode JSON]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Decode_JSON_Stream[Decode JSON Stream]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#Limit[Limit] — the rate limit extension is initialized with https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#OktaRateLimit[Okta (as "okta")] and the https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#DraftRateLimit[Draft Rate Limit (as "draft")] policies.
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Rate_Limit[Rate Limit]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#MIME[MIME] — the MIME extension is initialized with MIME handlers for "application/gzip", https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#NDJSON["application/x-ndjson"] and https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#Zip["application/zip"].
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-MIME[MIME]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#Regexp[Regexp] — the regular expression extension is initialized with the patterns specified in the user input configuration via the `regexp` field.
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-RE_Match[RE Match]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-RE_Find[RE Find]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-RE_Find_All[RE Find All]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-RE_Find_Submatch[RE Find Submatch]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-RE_Find_All_Submatch[RE Find All Submatch]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-RE_Replace_All[RE Replace All]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#Time[Time]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Format[Format]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Parse_Time[Parse Time]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Global_Variables[Global Variables]

* https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#Try[Try]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Try[Try]
** https://pkg.go.dev/github.com/elastic/mito@v0.0.0-20221207004749-2f0f2875e464/lib#hdr-Is_Error[Is Error]

In addition to the extensions provided in the packages listed above, a global variable `useragent` is also provided which gives the user CEL program access to the {beatname_lc} user-agent string.

Expand Down
3 changes: 2 additions & 1 deletion x-pack/filebeat/input/cel/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package cel

import (
"context"
"errors"
"fmt"
"net/http"
Expand Down Expand Up @@ -59,7 +60,7 @@ func (c config) Validate() error {
if len(c.Regexps) != 0 {
patterns = map[string]*regexp.Regexp{".": nil}
}
_, err = newProgram(c.Program, root, client, nil, patterns)
_, err = newProgram(context.Background(), c.Program, root, client, nil, patterns)
if err != nil {
return fmt.Errorf("failed to check program: %w", err)
}
Expand Down
Loading

0 comments on commit 296d5b6

Please sign in to comment.