Skip to content

Commit

Permalink
review(@pepov): Applying new doc format
Browse files Browse the repository at this point in the history
Signed-off-by: Csaba Tűz <[email protected]>
  • Loading branch information
csabatuz-chess committed Nov 28, 2023
1 parent 42dc258 commit 8d311c8
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 70 deletions.
69 changes: 34 additions & 35 deletions docs/configuration/plugins/filters/useragent.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,40 +37,39 @@ Join hashed data by '_'
Default: false


## Example `UserAgent` filter configurations
```yaml
apiVersion: logging.banzaicloud.io/v1beta1
kind: Flow
metadata:

name: demo-flow

spec:

filters:
- useragent:
key_name: my_agent
delete_key: true
out_key: ua_fields
flatten: true
selectors: {}
localOutputRefs:
- demo-output

```

#### Fluentd Config Result
```yaml
<filter **>

@type ua_parser
@id test_useragent
key_name my_agent
delete_key true
out_key ua_fields
flatten true

</filter>
```

## Example `UserAgent` filter configurations
```yaml
apiVersion: logging.banzaicloud.io/v1beta1
kind: Flow
metadata:

name: demo-flow

spec:
filters:
- useragent:
key_name: my_agent
delete_key: true
out_key: ua_fields
flatten: true
selectors: {}
localOutputRefs:
- demo-output
```
## Fluentd Config Result
```xml
<filter **>
@type ua_parser
@id test_useragent
key_name my_agent
delete_key true
out_key ua_fields
flatten true
</filter>
```


---
70 changes: 35 additions & 35 deletions pkg/sdk/logging/model/filter/useragent.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,41 +47,41 @@ type UserAgent struct {
Flatten bool `json:"flatten,omitempty"`
}

// ## Example `UserAgent` filter configurations
// ```yaml
// apiVersion: logging.banzaicloud.io/v1beta1
// kind: Flow
// metadata:
//
// name: demo-flow
//
// spec:
//
// filters:
// - useragent:
// key_name: my_agent
// delete_key: true
// out_key: ua_fields
// flatten: true
// selectors: {}
// localOutputRefs:
// - demo-output
//
// ```
//
// #### Fluentd Config Result
// ```yaml
// <filter **>
//
// @type ua_parser
// @id test_useragent
// key_name my_agent
// delete_key true
// out_key ua_fields
// flatten true
//
// </filter>
// ```
/*
## Example `UserAgent` filter configurations
```yaml
apiVersion: logging.banzaicloud.io/v1beta1
kind: Flow
metadata:
name: demo-flow
spec:
filters:
- useragent:
key_name: my_agent
delete_key: true
out_key: ua_fields
flatten: true
selectors: {}
localOutputRefs:
- demo-output
```
*/
// +docName:"Fluentd Config Result"
/*
## Fluentd Config Result
```xml
<filter **>
@type ua_parser
@id test_useragent
key_name my_agent
delete_key true
out_key ua_fields
flatten true
</filter>
```
*/
type _expUserAgent interface{} //nolint:deadcode,unused

func (g *UserAgent) ToDirective(secretLoader secret.SecretLoader, id string) (types.Directive, error) {
Expand Down

0 comments on commit 8d311c8

Please sign in to comment.