synthtraffic Get started
Docs menu

Connectors

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

YAML azure-blob.yaml
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

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

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

SettingRequiredAccepted valueDefault
typeYesazureBlob
accountUrlYesAbsolute HTTPS literal or env()
containerYesNon-empty literal or env()
concurrencyNoPositive integer literal4
formatNojsonl or jsonjsonl
compressionNonone or gzipnone
rolling.maxEventsNoPositive integer literal10000
rolling.maxBytesNoPositive B, KiB, MiB, or GiB literal16MiB
rolling.intervalNoPositive duration literal10s
maxOpenStreamsNoPositive integer literal16

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.
  • jsonl blobs use application/x-ndjson; json uses application/json. Gzip adds Content-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.