Skip to content
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

Allow to add custom fields via config #56

Merged
merged 2 commits into from
Apr 7, 2020
Merged

Allow to add custom fields via config #56

merged 2 commits into from
Apr 7, 2020

Conversation

sumo-drosiek
Copy link
Contributor

Expose custom_fields configuration parameter, which is going
to be merged with record's fields.

Example:

record[:fields] = "foo=bar"
custom_fields = "lorem=ipsum"

is going to generate

headers['X-Sumo-Fields']='foo=bar,lorem=ipsum'

Expose `custom_fields` configuration parameter, which is going
to be merged with record's fields.

Example:

```ruby
record[:fields] = "foo=bar"
custom_fields = "lorem=ipsum"
```

is going to generate

```ruby
headers['X-Sumo-Fields']='foo=bar,lorem=ipsum'
```
@sumo-drosiek
Copy link
Contributor Author

sumo-drosiek commented Apr 3, 2020

@samjsong Could you take care about reviewers? I don't have permissions for this repo :)
We also need add support in the k8s-collection, I will take care about it when this PR will be resolved

Copy link

@perk-sumo perk-sumo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -86,6 +86,9 @@ class Fluent::Plugin::Sumologic < Fluent::Plugin::Output
config_param :timestamp_key, :string, :default => 'timestamp'
config_param :proxy_uri, :string, :default => nil
config_param :disable_cookies, :bool, :default => false
# https://help.sumologic.com/Manage/Fields
desc 'Fields string (eg "a=b,c=d") which is going to be added to every record.'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could have used a better example
e.g cluster=payment, service=credit_card

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will do that

@vsinghal13 vsinghal13 merged commit e29465d into SumoLogic:master Apr 7, 2020
sumo-drosiek pushed a commit that referenced this pull request Apr 8, 2020
* custom_fields (#56)
* cutom_dimensions (#57)
* sumo_client (#59)
* compression (#58)
sumo-drosiek pushed a commit that referenced this pull request Apr 16, 2020
* custom_fields (#56)
* cutom_dimensions (#57)
* compression (#58)
sumo-drosiek added a commit that referenced this pull request Apr 22, 2020
* custom_fields (#56)
* cutom_dimensions (#57)
* compression (#58)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants