Skip to content

Azure Blob Storage ​

Overview ​

Export evaluation data to an Azure Blob Storage.

Everytime the FlushInterval or MaxEventInMemory is reached a new file will be added to Azure Blob Storage.

NOTE

If for some reason the Azure Blob Storage upload fails, we will keep the data in memory and retry to add the next time we reach FlushInterval or MaxEventInMemory.

Configure the relay proxy ​

To configure your relay proxy to use the Azure Blob Storage exporter, you need to add the following configuration to your relay proxy configuration file:

yaml
# ...
exporters:
  - kind: azureBlobStorage
    container: test-semaphore
    accountName: semaphore
# ...
Field nameMandatoryTypeDefaultDescription
kindYesstringnoneValue should be azureBlobStorage.
This field is mandatory and describes which retriever you are using.
containerYesstringnoneThis is the name of your Azure Blob Storage container (ex: my-featureflag-container).
accountNameYesstringnoneThis is the name of your Azure Blob Storage account.
accountKeyNostringnoneThis is the secret key of your Azure Blob Storage account.
flushIntervalNoint60000The interval in millisecond between 2 calls to the webhook (if the maxEventInMemory is reached before the flushInterval we will call the exporter before).
maxEventInMemoryNoint100000If we hit that limit we will call the exporter.
formatNostringJSONFormat is the output format you want in your exported file. Available format: JSON, CSV, Parquet.
filenameNostringflag-variation-{{ .Hostname}}-{{ .Timestamp}}.{{ .Format}}You can use a config template to define the name of your exported files. Available replacements are {{ .Hostname}}, {{ .Timestamp}} and {{ .Format}
csvTemplateNostring{{ .Kind}};{{ .ContextKind}};{{ .UserKey}};{{ .CreationDate}};{{ .Key}};{{ .Variation}};{{ .Value}};{{ .Default}};{{ .Source}}\nCsvTemplate is used if your output format is CSV.
This field will be ignored if you are using format other than CSV.
You can decide which fields you want in your CSV line with a go-template syntax, please check exporter/feature_event.go to see what are the fields available.
pathNostringbucket root levelThe location of the directory in S3.
parquetCompressionCodecNostringSNAPPYParquetCompressionCodec is the parquet compression codec for better space efficiency. Available options

Configure the GO Module ​

To configure your GO module to use the Azure Blob Storage exporter, you need to add the following configuration to your ffclient.Config{} object:

go
config := ffclient.Config{
    // ...
   DataExporter: ffclient.DataExporter{
        // ...
        Exporter: &azureexporter.Exporter{
            Container:   "test-semaphore",
            Format:   "json",
            Path:     "yourPath",
            Filename: "flag-variation-{{ .Timestamp}}.{{ .Format}}",
            AccountName: "semaphore",
            AccountKey: "XXXX",
        },
    },
    // ...
}
client, err := ffclient.New(config)
defer client.Close()
Field nameMandatoryDefaultDescription
Container YesnoneName of your Azure Blob Storage Container.
AccountName YesnoneThis is the name of your Azure Blob Storage account.
AccountKey NononeThis is the secret key of your Azure Blob Storage account.
FlushIntervalNo60000The interval in millisecond between 2 calls to the webhook (if the maxEventInMemory is reached before the flushInterval we will call the exporter before).
MaxEventInMemoryNo100000If we hit that limit we will call the exporter.
FormatNoJSONFormat is the output format you want in your exported file. Available format: JSON, CSV, Parquet.
FilenameNoflag-variation-{{ .Hostname}}-{{ .Timestamp}}.{{ .Format}}You can use a config template to define the name of your exported files. Available replacements are {{ .Hostname}}, {{ .Timestamp}} and {{ .Format}
CsvTemplateNo{{ .Kind}};{{ .ContextKind}};{{ .UserKey}};{{ .CreationDate}};{{ .Key}};{{ .Variation}};{{ .Value}};{{ .Default}};{{ .Source}}\nCsvTemplate is used if your output format is CSV.
This field will be ignored if you are using format other than CSV.
You can decide which fields you want in your CSV line with a go-template syntax, please check exporter/feature_event.go to see what are the fields available.
PathNobucket root levelThe location of the directory in S3.
ParquetCompressionCodecNoSNAPPYParquetCompressionCodec is the parquet compression codec for better space efficiency. Available options

Released under the MIT License.