-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make stackdriver agent work for detecting Json log #1169
Make stackdriver agent work for detecting Json log #1169
Conversation
@@ -230,7 +230,15 @@ func logHandler(client *http.Client) http.HandlerFunc { | |||
|
|||
data := map[string]string{ | |||
"log": "A log in json format to STDOUT", | |||
"foo": "bar", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To indicate any random key-value pair in json log emitted by the app can be collected/processed.
/lgtm |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mdemirhan, vaikas-google, yanweiguo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* change fluentd config * rename * change kubernetes_metadata version requirement
* inject images, generate manifests (knative#1150) * Revert temoprary branch for image injection (knative#1159) Co-authored-by: Kenjiro Nakayama <[email protected]>
* inject images, generate manifests (knative#1150) * Revert temoprary branch for image injection (knative#1159) Co-authored-by: Kenjiro Nakayama <[email protected]>
* inject images, generate manifests (knative#1150) * Revert temoprary branch for image injection (knative#1159) Co-authored-by: Kenjiro Nakayama <[email protected]>
* inject images, generate manifests (knative#1150) * Revert temoprary branch for image injection (knative#1159) Co-authored-by: Kenjiro Nakayama <[email protected]>
* [RELEASE-1.4] Inject images, generate manifests (knative#1169) * inject images, generate manifests (knative#1150) * Revert temoprary branch for image injection (knative#1159) Co-authored-by: Kenjiro Nakayama <[email protected]> * fixes for 1.5 * Kourier image injection (knative#1173) * Revert temoprary branch for image injection (knative#1186) Co-authored-by: Kenjiro Nakayama <[email protected]>
* [RELEASE-1.4] Inject images, generate manifests (knative#1169) * inject images, generate manifests (knative#1150) * Revert temoprary branch for image injection (knative#1159) Co-authored-by: Kenjiro Nakayama <[email protected]> * fixes for main * Kourier image injection (knative#1173) * Revert temoprary branch for image injection (knative#1186) * add pdb fix * Revert "add pdb fix" This reverts commit 1790632. Co-authored-by: Kenjiro Nakayama <[email protected]>
* [RELEASE-1.4] Inject images, generate manifests (knative#1169) * inject images, generate manifests (knative#1150) * Revert temoprary branch for image injection (knative#1159) Co-authored-by: Kenjiro Nakayama <[email protected]> * fixes for 1.6 * Kourier image injection (knative#1173) * Revert temoprary branch for image injection (knative#1186) Co-authored-by: Kenjiro Nakayama <[email protected]>
For a json log emitted by user, for example,
In fluentd event flows, before operator output configuration, we convert it to
For
stderr/stdout
,kubernetes_metadata
plugin does the json parsing, which is a responsibility shouldn't belong tokubernetes_metadata
. (This feature was removed since versionkubernetes_metadata
2.1.0). For varlog, we parse the json intail
.Then operator configure the destination backend and other extra process. This works fine for Elasticsearch, but it doesn't work for Stackdriver. Stackdriver will only try to parse
log
field as json if there're only the following fields: log(or message), time, severity, docker, kubernetes.Proposed Changes
log
field, which can be a json payload:parser
to parse the json.detect_json
parameter ingoogle_cloud
plugin.