Skip to content

feat: flb_plugin_proxy input plugins should support metrics event type #11914

@seblaz

Description

@seblaz

Is your feature request related to a problem? Please describe.

When writing an input plugin using flb_plugin_proxy (e.g. via fluent-bit-go), there is no way to emit metrics events. The proxy input collect callback in src/flb_plugin_proxy.c unconditionally calls flb_input_log_append(), so all data produced by proxy input plugins is treated as logs regardless of its actual type.

Describe the solution you'd like

Proxy input plugins should be able to declare an event_type and have the collect callback dispatch to the appropriate append function (flb_input_metrics_append(), flb_input_trace_append(), etc.) accordingly — mirroring how output proxy plugins already work:

  // src/flb_plugin_proxy.c — output side already does this
  if (def->event_type == 0) {
      out->event_type = FLB_OUTPUT_LOGS;
  } else {
      out->event_type = def->event_type;
  }

Concretely, this would require:

  1. Using the event_type field in the proxy input plugin definition struct.
  2. Modifying flb_proxy_input_cb_collect() to call the correct append function based on that field.
  3. Exposing the metrics/trace append APIs through fluent-bit-go (and other language SDKs).

Describe alternatives you've considered

The only current alternative is to rewrite the plugin as a native C input plugin, which defeats the purpose of the proxy/SDK layer. Native plugins like in_opentelemetry already call flb_input_metrics_append() directly, but that API is not accessible to proxy plugins.

Additional context

The goal is to write a Go input plugin that collects metrics and forwards them as FLB_INPUT_METRICS events so they can be routed through a metrics pipeline to a metrics-aware output. Today this is impossible via the proxy layer — proxy input plugins can only feed the logs pipeline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions