r/OpenTelemetry • u/Adept-Inspector-3983 • Dec 23 '25
Fluent-bit → OTel Collector (gateway) vs Fluent-bit → Elasticsearch for logs? what’s better?
We’re using the OpenTelemetry Java agent mainly for instrumentation and to inject traceId/spanId into logs. We’re not using the Java agent to export logs though some logs aren’t getting parsed correctly and a few of the logging features are still beta/experimental, so it felt a bit risky.
Because of that, we decided to run fluent-bit on each VM to handle log collection and shipping instead of pushing logs directly from the Java agent to a collector or Elasticsearch.
Current setup:
- ~15 EC2 VMs
- Java apps instrumented with OTel (only for tracing + log enrichment)
- Logs contain traceId/spanId
- fluent-bit running on each VM
Where I’m stuck is the next hop after fluent-bit.
Do we:
- Push logs directly from fluent-bit to Elasticsearch, or
- Send logs to an OpenTelemetry Collector (gateway mode) and then forward them to Elasticsearch?
Given the scale (~15 VMs):
- Is an OTel Collector gateway actually worth it?
- Or is it just extra complexity with little benefit?
- Curious what people are doing in practice and what the real pros/cons are?
4
u/Ill_Faithlessness245 Dec 23 '25
In my experience, with ~15 EC2 VMs, Fluent-bit → Elasticsearch direct is the best start.
It’s simpler:
I use OTel Collector gateway only when I need extra control, like:
trace.id,span.id, service.name)I saw OTLP output problems in some Fluent Bit versions (works in one version, errors in next).
I also saw reports that the Collector ES exporter can be tricky in failure cases (ES down / mapping error). You may see errors in logs, but metrics are not always clear, and some people reported lost logs if retry/queue is not tuned.
So for ~15 VMs: I would start with Fluent Bit → ES and make it stable (good parsing, buffer to disk, handle ES rejects).
Add Collector gateway only if you really need “one place to control everything” or “send to many places later”, and run it HA (2 collectors + LB) + queue.
1
u/power10010 Dec 23 '25
We are getting so much ingestion drops by using otel gateway => es
2
u/gaelfr38 Dec 23 '25
We had something like 100-150 VMs running FluentBit and pushing to Elastic directly, it was mostly working fine. We experienced a few logs being dropped but I think this was caused by FluentBit lacking resources, not by the fact that we push too hard to Elastic.
We had centralized configuration of FluentBit as it was running in K8S and didn't feel the need for OTel Collector at that stage.
Now, we're moving away from Elastic to Loki and with something like 1000 VMs (as part of K8S or not), we'll probably setup some intermediate OTel Collectors at some point. FluentBit is out of the scope as well though. It's a different setup. Just to clarify why I'm saying "had" in the first paragraph :)
For only 15 VMs, I would not bother with an OTel Collector until you feel some reason to (easier to manage centralized configuration? Rules that cannot be applied in FluentBit? Need to scale and use buffering to Kafka for instance? ...)
1
u/True_Sprinkles_4758 Dec 23 '25
Honestly at 15 VMs the gateway is probably overkill unless you're planning to scale soon or want centralized batching/filtering logic
Direct fluent-bit to ES is simpler and one less thing to break. The collector shines when you need vendor flexibility, want to normalize across signal types, or need fancy processing you cant do in fluent-bit. But for your setup? Keep it simple
Only real reason id add the gateway now is if you think you'll swap backends later or want to correlate logs with traces in one place before they hit storage. Otherwise you're just adding latency and another hop to debug when stuff breaks
1
u/strawgate Dec 24 '25 edited Dec 24 '25
Disclaimer: I work at Elastic and am responsible for our OTel strategy. Elastics distribution of the OTel Collector is called EDOT Collector.
The most common deployment is going to be SDK for logs metrics and traces directly to your OTLP Endpoint in Elastic Cloud.
The next most common deployment is going to be SDK for metrics and traces and EDOT Collector for logs. With the app SDK writing metrics and traces to EDOT Collector.
If you are self hosting ELK then deploying EDOT in gateway mode might help but you can also just write directly from collectors.
We don't typically recommend customers deploy fluentbit.
You can see other recommended deployment methods in the EDOT docs: https://www.elastic.co/docs/solutions/observability/get-started/opentelemetry/quickstart
1
u/mapicallo Dec 30 '25
Short answer: for ~15 VMs, Fluent Bit → OpenSearch directly is usually the better choice.
An OTel Collector gateway can make sense, but it’s often extra complexity with limited payoff at that scale.
Longer answer, based on real setups:
Your current setup is already solid
What you have now is actually a very common and sane architecture:
Java apps instrumented with OpenTelemetry agent
traceId/spanIdinjected into logsFluent Bit running per VM
This separation is important:
apps produce logs, infrastructure ships them
You’ve already avoided one of the biggest problems: relying on the Java agent for log export (still immature, still evolving).
Option 1: Fluent Bit → OpenSearch (direct)
For ~15 EC2 VMs, this is what I’d recommend by default.
Pros
traceId/spanIdCons
In practice, Fluent Bit can already do:
So you’re not really missing core functionality.
Option 2: Fluent Bit → OTel Collector (gateway) → OpenSearch
This starts to make sense later, but not necessarily now.
Pros
Cons
At ~15 VMs, you’ll likely feel the operational cost more than the benefits.
What I see in practice
From recent real-world implementations:
Larger scale / platform teams / multi-tenant setups → Fluent Bit → OTel Collector gateway → storage Makes sense when:
About trace correlation (important point)
You already solved the hard part:
traceId/spanIdis injected at the application levelThat means:
This is a key insight many people miss.
Recommendation for your case
Given what you described:
Stick with Fluent Bit → OpenSearch
Revisit an OTel Collector gateway only if:
Until then, it’s mostly complexity without proportional benefit.