You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My plan is adding emit_error_event to EventRouter.
I need a feedback for API design. @ERROR is optional so we should care no @ERROR case.
Considering record_transformer plugin as an example:
deffilter_stream(tag,es)new_es=MultiEventStream.new# ...last_record=niles.eachdo |time,record|
last_record=record# for debug logbeginnew_record=reform(time,record,placeholders)new_es.add(time,new_record)rescue=>e# Need good APIendendnew_esrescue=>e# should change to more better message.log.warn"failed to reform records",:error_class=>e.class,:error=>e.messageend
In my plan, emit_error_event signature is below:
emit_error_event(tag,time,record,error)
Without @ERROR
emit_error_event dumps logs with received arguments.
es.eachdo |time,record|
beginnew_record=reform(time,record,placeholders)new_es.add(time,new_record)rescue=>erouter.emit_error_event(tag,time,record,error)# dump "emit failed. tag = foo, time = bar, record = {...}, error = message" like logendend
or callback:
router.emit_error_event(tag,time,record,error){log.warn"map is hoge"}
Former is easy to implement. Latter can dump plugin specific log message.
With @ERROR
Event are routed to @ERROR's match.
Should we dump additional "emit failed" like messages with warn or debug level?
Using warn, we can use <match fluent**> approach to send fluentd logs to monitor system.
The text was updated successfully, but these errors were encountered:
I hope this is the last discussion for v0.12.
I am now working for adding error emit to send invalid record to
@ERROR
.Basic design is here: https://github.com/fluent/fluentd/wiki/V1-Roadmap#error-stream
My plan is adding
emit_error_event
toEventRouter
.I need a feedback for API design.
@ERROR
is optional so we should care no@ERROR
case.Considering
record_transformer
plugin as an example:In my plan,
emit_error_event
signature is below:Without
@ERROR
emit_error_event
dumps logs with received arguments.or callback:
Former is easy to implement. Latter can dump plugin specific log message.
With
@ERROR
Event are routed to
@ERROR
'smatch
.Should we dump additional "emit failed" like messages with
warn
ordebug
level?Using
warn
, we can use<match fluent**>
approach to send fluentd logs to monitor system.The text was updated successfully, but these errors were encountered: