fluent-bit-go icon indicating copy to clipboard operation
fluent-bit-go copied to clipboard

Way to pass OUTPUT context to the function FLBPluginFlush ?

Open keyolk opened this issue 8 years ago • 8 comments

I have problem that supporting multiple OUPUT target using custom plugin. From that it needs to distinguish caller of FLBPluginFlush.

from C written plugin source code, I can see the function "flb_output_set_context"

Is there similar method on golang ? Or schedule to support ?

keyolk avatar Aug 01 '17 14:08 keyolk

@keyolk there is no API for that at the moment. Make sense to add it. How urgent it is ?

edsiper avatar Aug 01 '17 16:08 edsiper

@edsiper Thanks.

If it takes long time. It would be better to start changing my plugin to C based thing. : ( Hope it supports the API soon.

keyolk avatar Aug 01 '17 17:08 keyolk

what kind of output plugin are you implementing ?

edsiper avatar Aug 01 '17 17:08 edsiper

@edsiper I have to send my logs through raw TCP based protocol. Now I do copy&modify C based fluentd output plugin. : )

keyolk avatar Aug 02 '17 04:08 keyolk

I also need this. I have multiple [OUTPUT] sections for the same plugin, intending to send some messages to one destination and others to a different destination. Right now I don't see a way of telling what messages are intended to go to what destination when my FLBPluginFlush is called. Perhaps passing in the ctx to FLBPluginFlush?

jasonkeene avatar Jun 28 '18 15:06 jasonkeene

update: if is there any volunteer to work on this feel free to ping me (quite busy now)

edsiper avatar Oct 24 '18 21:10 edsiper

@wfernandes and I have opened PRs that will fix this issue here:

  • https://github.com/fluent/fluent-bit-go/pull/15
  • https://github.com/fluent/fluent-bit/pull/1275

jasonkeene avatar Apr 17 '19 17:04 jasonkeene

@edsiper This can be closed since #15 was merged.

jasonkeene avatar Apr 21 '19 19:04 jasonkeene