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

PROPOSE: add format raw #182

Merged
merged 2 commits into from
Sep 7, 2013
Merged

PROPOSE: add format raw #182

merged 2 commits into from
Sep 7, 2013

Conversation

sonots
Copy link
Member

@sonots sonots commented Sep 2, 2013

I propose to add format raw.

Currently, even if users do not require to parse log lines, we have to write configuration like

<source>
    type tail
    format /^(?<message>.*)$/
    ....
</source>

This requires to parse log lines by a regular expression, and its overhead is not trivial.

       user     system      total        real
asis:    0.080000   0.000000   0.080000 (  0.081076)
regexp:  7.590000   0.000000   7.590000 (  7.592521)

cf. http://blog.1q77.com/2013/01/fluent-agent-lite-%E3%81%A8-in_tail/

This plugin enables to write configuration like

<source>
    type tail
    format raw
    message_key message
    ....
</source>

(where message_key is set to message as default) and does not require to parse log lines by a regular expression.

There is a plugin fluent-plugin-tail-asis which does the same thing with this patch, and downloaded 2354 times as in 2013.09.02 http://fluentd.org/plugin/. It tells us that some users are already using this feature, and I propose to have this feature in the fluentd itself.

@tagomoris
Copy link
Member

Structured raw logs come here!

@nikushi
Copy link

nikushi commented Sep 4, 2013

👍

@ghost ghost assigned repeatedly Sep 4, 2013
@SpringMT
Copy link

SpringMT commented Sep 4, 2013

👍

2 similar comments
@yancya
Copy link

yancya commented Sep 4, 2013

👍

@futoase
Copy link

futoase commented Sep 4, 2013

👍

@repeatedly
Copy link
Member

format raw seems mismatch name.
For me, raw represents 'No transformation and emit logs directly' like splunk.

I want more clear name...


def call(text)
record = {}
record[@message_key] = text
Copy link

Choose a reason for hiding this comment

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

🌻

@frsyuki
Copy link
Member

frsyuki commented Sep 4, 2013

proposal: "format message"

It still creates a structured record and its key name is "msssage". raw doesn't imply this behavior.
Apart from the name, I think it's good idea to include this REGEXP. GJ!

@adriancdperu
Copy link

👍 totally up for this one. sometimes you just dont want to parse the stuff..

@studio3104
Copy link

👍

1 similar comment
@kenjiskywalker
Copy link
Contributor

👍

@sonots
Copy link
Member Author

sonots commented Sep 4, 2013

proposal: "format none"

I think that the value of format option should describe the name of a format.
format message lets me feel like "what was the message format?".

In contrast, I think format none clearly describes as its format is none (although I felt the same thing for format raw too ...)

How do you think?

@kentaro
Copy link
Contributor

kentaro commented Sep 4, 2013

👍 > format none

or

How about format plain?

@y-ken
Copy link
Member

y-ken commented Sep 4, 2013

I feel format plain is the best one.

@choplin
Copy link

choplin commented Sep 4, 2013

proposal: format whole_line

This indicates directly what will comes in records.

@studio3104
Copy link

👍 > format plain

@sonots
Copy link
Member Author

sonots commented Sep 4, 2013

@repeatedly it seems format plain is the most popular. what do you think? If it's okay, I will modify the source code.

@tagomoris
Copy link
Member

All of you can use fluent-agent-lite for raw-plain-whole-message record.
https://github.com/tagomoris/fluent-agent-lite

@kentaro
Copy link
Contributor

kentaro commented Sep 4, 2013

@tagomoris Anybody knows your work :octocat:

@yteraoka
Copy link

yteraoka commented Sep 4, 2013

👍 > format none

@repeatedly
Copy link
Member

format none or format plain are candidate.

For me, plain seems to be similar to raw.
So 👍 for format none.

I wait a day for decision.

@sonots
Copy link
Member Author

sonots commented Sep 6, 2013

@repeatedly renamed raw to none!!

@y-ken
Copy link
Member

y-ken commented Sep 6, 2013

format none is also good 👍

repeatedly added a commit that referenced this pull request Sep 7, 2013
@repeatedly repeatedly merged commit 55aab1f into fluent:master Sep 7, 2013
@repeatedly
Copy link
Member

none wins!

@sonots sonots deleted the raw_parser branch September 8, 2013 03:11
@sonots
Copy link
Member Author

sonots commented Sep 8, 2013

thanks!!

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.