-
Notifications
You must be signed in to change notification settings - Fork 167
LOG-5519: Refactor outputs to support templating #2562
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
Conversation
|
@Clee2691: This pull request references LOG-5519 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.8.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
| func NormalizeStreamName(componentID string, inputs []string) Element { | ||
| vrl := strings.TrimSpace(` | ||
| .group_name = "default" | ||
| .stream_name = "default" |
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.
maybe not part of this PR, but maybe we need to consider adding and templatizing this to the API in 6.0 I can imagine:
- container is "pod_name_container_name"
- other is source
where group_name should be either namespace or node name
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'm not sure what you mean by this. The group_name identifies the log stream and is what is now groupName in the API that combined groupBy and groupPrefix.
If you mean the stream_name I can see us templating this but wasn't something we exposed in the API originally. stream_name is separate from the group_name.
| for _, l := range logGroupsOutput.LogGroups { | ||
| // Filter by type and get all | ||
| if *l.LogGroupName == "group-prefix."+inputName { | ||
| if *l.LogGroupName == "group-prefix-"+inputName { |
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 this chane?
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 guess the bigger question here is what characters are allowed/not allowed for this as well as indices for other outputs.
|
@Clee2691 lets make sure we identify changes from before and are prepared to properly document them |
e73e3c0 to
bfdd981
Compare
|
@Clee2691: This pull request references LOG-5519 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.8.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@Clee2691: This pull request references LOG-5519 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.8.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@Clee2691: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Clee2691, jcantrill 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 |
Description
This PR refactors outputs with supported tenancy configuration to allow a limited version of vector's template syntax.
This also removes AWS Cloudwatch's
groupPrefix&groupByand condenses them intogroupName.Supported outputs are:
groupNameindexlogIdtopictenantKeyindexA static tenant must match the pattern consisting of only letters, numbers, underscores (
_), dots (.), dashes (-), and slashes(/).For dynamic values, a path expression must only include letters, numbers, underscores (
_), and dots (.). A space can be added before and after the path expression like so:{{ .log_type }}.Valid Tenant Examples:
baz-{{.foo.bar}}foo{{.foo}}foo-bar_{{.baz}}foo-{{.bar.baz}}-foo{{.foo}}-{{.bar}}_{{.foo.bar.baz}}{{.foo}}{{.bar}}{{ .foo }}/{{ .bar }}/cc @cahartma @vparfonov
/assign @jcantrill
Links