-
Notifications
You must be signed in to change notification settings - Fork 500
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
stackdriver: amend special fields docs #1267
Conversation
Signed-off-by: braydonk <[email protected]>
28cc0d5
to
ef0d252
Compare
Should the
|
Yeah I should add that as well, I'll do that today. |
… docs for key fields Signed-off-by: braydonk <[email protected]>
9026cf9
to
1c37809
Compare
This is no longer waiting for the PR it depended on: fluent/fluent-bit#8209. I forgot to add the label that says this PR was ever waiting on something, so consider this the same as me removing the label I forgot to add 😄 |
@@ -1,19 +1,29 @@ | |||
# Stackdriver Special fields |
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.
Why do we need to split this out into a separate doc @braydonk ?
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.
I don't know, this was done well before my time by another Google employee who doesn't work in this area anymore. I'll check with my team and see if anyone would mind merging it into the main doc
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.
Appreciate it mate, I was just thinking it might be easier to merge into one but if not I can merge
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.
There are some broken links. I added suggestions. Please review and validate.
pipeline/outputs/stackdriver.md
Outdated
@@ -25,11 +25,12 @@ Before to get started with the plugin configuration, make sure to obtain the pro | |||
| resource | Set resource type of data. Supported resource types: _k8s\_container_, _k8s\_node_, _k8s\_pod_, _global_, _generic\_node_, _generic\_task_, and _gce\_instance_. | global, gce\_instance | | |||
| k8s\_cluster\_name | The name of the cluster that the container \(node or pod based on the resource type\) is running in. If the resource type is one of the _k8s\_container_, _k8s\_node_ or _k8s\_pod_, then this field is required. | | | |||
| k8s\_cluster\_location | The physical location of the cluster that contains \(node or pod based on the resource type\) the container. If the resource type is one of the _k8s\_container_, _k8s\_node_ or _k8s\_pod_, then this field is required. | | | |||
| labels\_key | The value of this field is used by the Stackdriver output plugin to find the related labels from jsonPayload and then extract the value of it to set the LogEntry Labels. | logging.googleapis.com/labels | | |||
| labels\_key | The value of this field is used by the Stackdriver output plugin to find the related labels from jsonPayload and then extract the value of it to set the LogEntry Labels. | `logging.googleapis.com/labels`. See [Stackdriver Special Fields](StackdriverSpecialFields) for more info. | |
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.
| labels\_key | The value of this field is used by the Stackdriver output plugin to find the related labels from jsonPayload and then extract the value of it to set the LogEntry Labels. | `logging.googleapis.com/labels`. See [Stackdriver Special Fields](StackdriverSpecialFields) for more info. | | |
| labels\_key | The value of this field is used by the Stackdriver output plugin to find the related labels from jsonPayload and then extract the value of it to set the LogEntry Labels. | `logging.googleapis.com/labels`. See [Stackdriver Special Fields](stackdriver_special_fields.md) for more info. | |
pipeline/outputs/stackdriver.md
Outdated
| labels | Optional list of comma separated of strings specifying `key=value` pairs. The resulting `labels` will be combined with the elements in obtained from `labels_key` to set the LogEntry Labels. Elements from `labels` will override duplicate values from `labels_key`.| | | ||
| log\_name\_key | The value of this field is used by the Stackdriver output plugin to extract logName from jsonPayload and set the logName field. | logging.googleapis.com/logName | | ||
| log\_name\_key | The value of this field is used by the Stackdriver output plugin to extract logName from jsonPayload and set the logName field. | `logging.googleapis.com/logName`. See [Stackdriver Special Fields](StackdriverSpecialFields) for more info. | |
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.
| log\_name\_key | The value of this field is used by the Stackdriver output plugin to extract logName from jsonPayload and set the logName field. | `logging.googleapis.com/logName`. See [Stackdriver Special Fields](StackdriverSpecialFields) for more info. | | |
| log\_name\_key | The value of this field is used by the Stackdriver output plugin to extract logName from jsonPayload and set the logName field. | `logging.googleapis.com/logName`. See [Stackdriver Special Fields](stackdriver_special_fields.md) for more info. | |
pipeline/outputs/stackdriver.md
Outdated
| tag\_prefix | Set the tag\_prefix used to validate the tag of logs with k8s resource type. Without this option, the tag of the log must be in format of k8s\_container\(pod/node\).\* in order to use the k8s\_container resource type. Now the tag prefix is configurable by this option \(note the ending dot\). | k8s\_container., k8s\_pod., k8s\_node. | | ||
| severity\_key | Specify the name of the key from the original record that contains the severity information. | | | ||
| severity\_key | Specify the name of the key from the original record that contains the severity information. | `logging.googleapis.com/severity`. See [Stackdriver Special Fields](StackdriverSpecialFields) for more info. | |
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.
| severity\_key | Specify the name of the key from the original record that contains the severity information. | `logging.googleapis.com/severity`. See [Stackdriver Special Fields](StackdriverSpecialFields) for more info. | | |
| severity\_key | Specify the name of the key from the original record that contains the severity information. | `logging.googleapis.com/severity`. See [Stackdriver Special Fields](stackdriver_special_fields.md) for more info. | |
pipeline/outputs/stackdriver.md
Outdated
| tag\_prefix | Set the tag\_prefix used to validate the tag of logs with k8s resource type. Without this option, the tag of the log must be in format of k8s\_container\(pod/node\).\* in order to use the k8s\_container resource type. Now the tag prefix is configurable by this option \(note the ending dot\). | k8s\_container., k8s\_pod., k8s\_node. | | ||
| severity\_key | Specify the name of the key from the original record that contains the severity information. | | | ||
| severity\_key | Specify the name of the key from the original record that contains the severity information. | `logging.googleapis.com/severity`. See [Stackdriver Special Fields](StackdriverSpecialFields) for more info. | | ||
| project_id_key | The value of this field is used by the Stackdriver output plugin to find the gcp project id from jsonPayload and then extract the value of it to set the PROJECT_ID within LogEntry logName, which controls the gcp project that should receive these logs. | `logging.googleapis.com/projectId`. See [Stackdriver Special Fields](StackdriverSpecialFields) for more info. | |
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.
| project_id_key | The value of this field is used by the Stackdriver output plugin to find the gcp project id from jsonPayload and then extract the value of it to set the PROJECT_ID within LogEntry logName, which controls the gcp project that should receive these logs. | `logging.googleapis.com/projectId`. See [Stackdriver Special Fields](StackdriverSpecialFields) for more info. | | |
| project_id_key | The value of this field is used by the Stackdriver output plugin to find the gcp project id from jsonPayload and then extract the value of it to set the PROJECT_ID within LogEntry logName, which controls the gcp project that should receive these logs. | `logging.googleapis.com/projectId`. See [Stackdriver Special Fields](stackdriver_special_fields.md) for more info. | |
ping @braydonk |
pipeline/outputs/stackdriver.md
Outdated
@@ -189,3 +190,5 @@ Do following check: | |||
Stackdriver officially supports a [logging agent based on Fluentd](https://cloud.google.com/logging/docs/agent). | |||
|
|||
We plan to support some [special fields in structured payloads](https://cloud.google.com/logging/docs/agent/configuration#special-fields). Use cases of special fields is [here](./stackdriver_special_fields.md). | |||
|
|||
[StackdriverSpecialFields]: ./stackdriver_special_fields.md#log-entry-fields |
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.
Hi @lecaros, this should make it so the links aren't broken. How did you test it?
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.
hi @braydonk.
I just previewed the page and clicked on the links. I've sent suggestions for the changes.
https://github.com/fluent/fluent-bit-docs/blob/1c37809a03386629028cadf4d133ae83bd8af969/pipeline/outputs/stackdriver.md
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.
Should be fixed now. I had the syntax wrong for referring to the named link.
Signed-off-by: braydonk <[email protected]>
Thanks @braydonk! Merged. |
This PR fixes up the stackdriver special fields docs by adding some fields that were missing.