Docs menu
Build a scenario
Scenario file Generators vars and const Time and pace Defaults Relationships Schedules Instances Lifecycle Collections Connections Delivery behaviorConnectors
Azure Blob
Azure Blob uses the File artifact model: generators produce {prefix, value} envelopes, then the connection groups them into rolling JSON or JSONL blobs.
The scenario below previews:
{
"prefix": "orders/part-",
"value": {
"orderId": "ORD-001",
"status": "placed"
}
}
Write order blobs
connections:
objectStore:
type: azureBlob
accountUrl: https://synthtraffic.blob.core.windows.net
container: events
generators:
- name: orders
connection: objectStore
config:
maxEvents: 2
vars:
orderId: =seq(format=ORD-%03d)
prefix: orders/part-
value:
orderId: $orderId
status: placed
accountUrl selects the storage account endpoint and container selects the destination container. prefix becomes the beginning of each blob name.
Preview without Azure
sample prints a short preview to your terminal. It does not
wait for real-time pacing, and it never opens Kafka, PostgreSQL, or other
destinations.
synthtraffic sample azure-blob.yaml --events 2 --seed 42 docker run --rm \
--env-file ./license.env \
--volume "${PWD}/azure-blob.yaml:/work/azure-blob.yaml:ro" \
synthtraffic/synthtraffic:latest \
sample /work/azure-blob.yaml --events 2 --seed 42 run --stdout prints the destination-shaped envelope locally
without opening the configured connection. Remove --stdout
when you are ready to send to that destination.
synthtraffic run azure-blob.yaml --stdout --events 2 --seed 42 docker run --rm \
--env-file ./license.env \
--volume "${PWD}/azure-blob.yaml:/work/azure-blob.yaml:ro" \
synthtraffic/synthtraffic:latest \
run /work/azure-blob.yaml --stdout --events 2 --seed 42 Full flag lists: sample and run. Install and license: Install.
Neither command discovers an Azure identity, opens a client, or checks the container.
Connection settings
| Setting | Required | Accepted value | Default |
|---|---|---|---|
type | Yes | azureBlob | — |
accountUrl | Yes | Absolute HTTPS literal or env() | — |
container | Yes | Non-empty literal or env() | — |
concurrency | No | Positive integer literal | 4 |
format | No | jsonl or json | jsonl |
compression | No | none or gzip | none |
rolling.maxEvents | No | Positive integer literal | 10000 |
rolling.maxBytes | No | Positive B, KiB, MiB, or GiB literal | 16MiB |
rolling.interval | No | Positive duration literal | 10s |
maxOpenStreams | No | Positive integer literal | 16 |
accountUrl cannot contain user information, query parameters, or a fragment. It must use HTTPS even when its value comes from env(). concurrency must be a positive literal and limits simultaneous blob commits.
The DSL does not accept connection strings, account keys, SAS tokens, or a separate endpoint field.
Authentication
A connected run creates DefaultAzureCredential and requests access to Azure Storage. Configure a supported Azure identity in the environment where Synthtraffic runs, such as a workload identity, managed identity, or development credential.
For Docker, pass the identity environment into the container or run it in an environment with workload identity. Credentials are process configuration, not scenario fields.
Local emulator limitation
The standard Azurite endpoint uses HTTP, while accountUrl requires HTTPS. That default endpoint cannot be configured in a Synthtraffic scenario. An emulator is usable only when exposed through a valid HTTPS account URL and an identity flow accepted by DefaultAzureCredential; connection strings are not supported.
Blob and delivery behavior
- The container must already exist.
- Blob names use
{prefix}{runULID}-{ordinal}.{format}[.gz]. - Synthtraffic creates blobs only when they do not already exist.
jsonlblobs useapplication/x-ndjson;jsonusesapplication/json. Gzip addsContent-Encoding: gzip.- An event counts as delivered only after its artifact commits. Missing containers, name collisions, credential failures, and upload failures fail the run.
Prefix validation, rolling thresholds, formats, compression, and stream eviction are identical to File.
Write for real
Configure the Azure identity, create the container, and remove --stdout:
synthtraffic run azure-blob.yaml --events 2 --seed 42
Complete example: examples/connectors/azure-blob.yaml.