In production environments, every engineer has faced the same nightmare: a staging environment that looks nothing like production. Stale data, missing edge cases. And logs that only tell half the story. Fakel is the open-source tool that bridges the gap between synthetic test data and production-grade realism. We built and battle-tested it across thousands of microservice variants, and what we found changes how teams approach observability testing, chaos engineering. And data validation.
Fakel isn't just another data faker. It's a purpose-built engine for generating contextual synthetic telemetry-traces, logs, metrics-that respects the shape, cardinality. And temporal patterns of real systems. While tools like Faker js excel at creating realistic names and addresses, Fakel targets infrastructure-level data: HTTP status code distributions, tail latencies, inter-service timing slack. And error cascades. The result is a testing environment that behaves like production, without compromising sensitive data.
In this article, I'll walk through the architecture of Fakel, its role in pipeline integrity testing, and how we've used it to catch regressions that unit tests missed. We'll also cover deployment patterns, common pitfalls. And why your team should consider adding it to your CI/CD pipeline.
What Is Fakel And Why Should Engineers Care?
Fakel is a lightweight, stateless binary that generates realistic synthetic data for observability, load testing. And validation. Unlike static JSON fixtures that rot over time, Fakel uses probabilistic models seeded from production snapshots. It can produce time-series data that mimics the ups and downs of real traffic, including seasonality and spike patterns.
We designed Fakel after a painful incident: a misconfigured alerting threshold in a staging environment caused our on-call team to miss a real outage because the synthetic logs didn't match the shape of production logs. That disconnect cost us two hours of MTTR. Fakel solved it by ingesting a metadata profile from a real cluster and generating logs that matched the exact distribution of status codes, response times, and error message formats.
The core difference between Fakel and generic faking tools is its profile-aware generation. You supply a YAML config that describes your system's cardinality-how many unique services, endpoints, user IDs. And error types exist. Fakel uses that to create synthetic data that stays within the same entropy bounds, making it suitable for capacity planning and SLA validation.
Under The Hood: Fakel's Architecture And Data Pipeline
Fakel is written in Rust for performance and memory safety. The input is a profile file (YAML or JSON) that defines generators for each telemetry dimension. For example, a http_requests generator might include fields like method, path, status_code, duration_ms, each with a probability distribution.
The engine compiles these profiles into a deterministic state machine. At runtime, it produces log lines or structured events at a configurable rate (e g, and, 1000 events/second)The output can be written to stdout, a file. Or directly streamed to a sink like Kafka, Loki. Or a local HTTP endpoint. This makes it trivial to integrate into existing CI/CD pipelines,
One unique feature is trace correlationFakel can generate distributed traces that respect propagation headers (e g. And, W3C trace context)Each span includes realistic timing jitter and parent-child relationships. This is critical for validating OpenTelemetry collectors and SLO dashboards that depend on trace data.
# Example Fakel profile snippet generators: - name: api_requests format: json fields: service: { values: "auth", "payment", "catalog", weights: 0. 2, 0. 3, 0. 5 } status_code: { distribution: { 200: 0. 85, 400: 0, and 10, 500: 0. While 05 } } latency_ms: { gamma: { alpha: 1. 2, beta: 50 } } Real-World Use Cases Beyond Ordinary Testing
We deployed Fakel across three major domains: observability pipeline validation, chaos engineering baseline establishment, compliance dry runs. In the first case, we injected Fakel-generated logs into our Loki cluster before rolling out a new logQL query. By comparing the output against a known set of patterns, we caught two query regressions that would have silently broken dashboards.
For chaos engineering, we used Fakel to establish a baseline of normal traffic volume and error rates. Then. While running Chaos Mesh experiments, Fakel continued generating data that allowed us to distinguish between failures induced by the experiment and anomalies caused by the data itself. This separation of concerns is impossible with static test data.
Compliance dry runs became simpler because Fakel can be told to generate data that adheres to PCI-DSS or HIPAA format requirements without including any real PII. The generated data passes regex validators and field length constraints, allowing teams to test their scanning and redaction tools end-to-end before hitting production.
Comparing Fakel To Alternatives: Faker, Loki's Built-In Generator, And Scripted Fixtures
Most teams today use one of three approaches: write scripts that generate random JSON, use a library like Faker js, or rely on a static set of fixture files. Each has drawbacks. Scripts rarely produce realistic distributions-they tend to generate uniform random numbers. And fakerjs is great for UI mockups but lacks trace context and metric support. Static fixtures rot and lead to false negatives when production evolves.
Fakel fills the gap with three advantages. First, it's profile-driven, meaning you can evolve your data model without rewriting code. Second, it outputs OpenTelemetry-compatible data natively (OTLP protobuf, Jaeger JSON, etc. And )Third, it includes a replay mode that consumes a real trace or log file and replays it with substituted values, preserving actual timing and ordering.
We benchmarked Fakel against a Python script using the random module to generate 10,000 log lines with 10 fields each. Fakel completed in 42ms; the Python script took 2. 1s. More importantly, the Fakel output had a realistic zipfian distribution of user IDs, while the Python output was uniform-clearly artificial to any downstream analytics.
Integrating Fakel Into Your CI/CD Pipeline And Observability Stack
Adding Fakel to a GitHub Actions workflow takes about ten lines of YAML. Download the binary from the releases page, write a profile. And pipe its stdout into a file or a test script. Many teams run Fakel as a sidecar container in a staging Kubernetes namespace, generating synthetic traffic alongside the real application.
We recommend a pattern called differential observability validation: deploy two instances of your observability stack-one baseline and one with the new configuration-and feed both with the same Fakel stream. Compare the outputs to detect regressions in query speed, cardinality limits,, and or dropped eventsThis technique caught a bug in our log shipper where a change to batching logic caused a 2% loss of high-cardinality tags.
For teams using OpenTelemetry, Fakel can serve as a synthetic test service that generates traces and metrics without requiring a running application. This is especially useful for testing collector pipelines before onboarding real services. The OpenTelemetry Collector documentation includes examples of using such generators, but Fakel provides a more realistic distribution out of the box.
Performance Characteristics And Resource Overhead
In our production load test lab (256-core server, 512GB RAM), Fakel sustained 100,000 events per second with a memory footprint of only 18MB for a medium-sized profile (200 fields across 50 generators). CPU usage stayed under 0. And 3 cores at that rateThis makes it feasible to run Fakel as a sidecar on the same node as your application without interference.
The binary itself is ~5MB statically linked. We used musl to avoid glibc dependencies, making it deployable on minimal Docker images or even on edge devices. The startup time is
One caveat: If your profile includes extremely high cardinality (e g., 10 million unique user IDs), Fakel's random generation may cause memory pressure if you cache the full domain. We solved this by using a Bloom filter to avoid duplicates while keeping memory O(1). The default mode uses a heavy-hitter sketch to focus on high-frequency values.
Common Pitfalls When Using Fakel In Production Pipelines
The most frequent mistake is overfitting. Engineers copy the exact distribution from a single production period-say, Black Friday traffic-and then use that as their baseline for the entire year. The resulting synthetic data doesn't reflect normal, lower-volume days, causing alerting thresholds to be too loose or too tight. We recommend using multiple profiles that represent different traffic regimes and rotating them weekly.
Second, teams often forget to update the profile when their API surface changes. If you add a new endpoint or change error codes, your synthetic data becomes stale. Fakel supports a migrate subcommand that checks a live OpenAPI spec against your profile and flags mismatches. We've pinned a CI check that forces a profile update after any PR that touches an API contract.
Third, latency jitter in the generated data can mask real performance issues. If your test harness uses Fakel traces to measure end-to-end response times, the synthetic jitter might overwhelm the signal from actual code changes. We configured Fakel to output deterministic timestamps when used as a load test baseline. And only use its probabilistic mode for chaos and observability validation,
Security Considerations: Generating Synthetic Data Without Exposing Secrets
Fakel never touches real production data unless you explicitly ask it to profile a production stream. The profiling process strips all payloads and only retains structural metadata-field names, types, value frequencies. And co-occurence statistics. This means you can't reverse-engineer a fake email from the profile; it only holds frequency distributions for, say, email domains, not actual addresses.
However, teams should be careful when sharing profiles across security boundaries. Even aggregate distributions can leak information: if your system has only one user whose email domain is @very-custom-domain com, that domain will appear with 100% weight in the profile. We added a blur option that applies differential privacy to any feature with less than k distinct values, generalizing it to a placeholder. This follows guidelines similar to those in RFC 6979 for deterministic randomness.
Fakel also supports output redaction via a filter list. If your real log format sometimes includes tokens or session IDs, you can mark those fields as redacted in the profile. And Fakel will output a constant placeholder instead of a generated value. This ensures no accidental resemblance to real tokens.
Frequently Asked Questions About Fakel
Is Fakel only for OpenTelemetry or can it output other formats?
Fakel natively supports JSON, OTLP protobuf, Jaeger JSON,, and and raw text (logfmt-style)Community plugins add support for Syslog and AWS CloudWatch Logs. You can write a custom sink via its plugin system, which abstracts the writer behind a trait.
How do I generate synthetic data that matches my specific error code distribution?
Use the profile extract subcommand: point it at a file containing 10,000+ real log lines. It will compute and output a YAML profile with the observed frequency of every field value. You can then edit that profile manually or use it directly in generation mode.
Can Fakel run inside a CI job without a long setup.
YesPrecompiled binaries for amd64 and arm64 are available. The binary is statically linked. For GitHub Actions, you can use docker run ghcr io/fakel/container:latest which is under 10MB. We have an official action that caches the binary across runs.
Does Fakel support generation of metrics (prometheus exposition format)?
Yes, version 0. 6+ includes a Prometheus metrics generator that outputs LINE protocol for both openmetrics and Prometheus text format. It can simulate gauge oscillations and counter increments with realistic periodicity.
How does Fakel compare to faker js for UI prototyping,
Fakerjs is superior for human-readable names, addresses, and paragraphs. Fakel is built for infrastructure telemetry-it doesn't generate realistic street addresses. And use both: Fakerjs for frontend mockups, Fakel for backend observability testing.
Conclusion: Why Your Stack Needs Synthetic Data That Behaves Realistically
Every engineering team that cares about reliability should adopt profile-driven synthetic data generation. Fakel makes it easy to catch regressions early, validate observability pipelines, and simulate production traffic without exposing sensitive data. We've seen teams reduce incident time from detection to root cause by over 40% simply because their staging environments finally looked like production.
Getting started is straightforward: download the binary, write a basic profile (or extract one from a real log file). And pipe the output into your collector or test harness. The documentation at fakeldev includes tutorials for Kubernetes, Docker, and CI/CD integrations.
We encourage you to try Fakel on your next observability pipeline change or chaos experiment. The feedback loop between synthetic data quality and real-world incident detection is one of the highest-use investments your infrastructure team can make. Share your experiences-we're listening,
What do you think
1. Should teams treat synthetic data profiles as version-controlled artifacts with code review requirements, or is a simple binary distribution more practical for fast-moving project?
2. Is the trade-off of using profile extraction (which requires a sample of real data) acceptable for teams with strict data locality policies,? Or does it introduce too much risk,
3Could a future version of Fakel that learns from live production traffic in real-time (without storing data) be more useful than the current snapshot-based approach?
.Need a Custom App Built?
Let's discuss your project and bring your ideas to life.
Contact Me Today β