identifiers.toml: Identifiers#

identifiers.toml#

Configuration for identifiers per service.

This configuration maps service names to the identifier prefixes they should use for tagging measurements and events. Each prefix is associated with a source service that manages the generation of new identifiers with that prefix. If the source service is the same as the service name, then the service manages its own identifiers with that prefix. Otherwise, the service relies on the source service to generate new identifiers.

See orangeqs.juice.identifiers for more details on how to use identifiers in Juice services.

Copy-paste default configuration

Use this as a starting point in identifiers.toml.

allowed_devices_mode = "optional"

[services]
services#

Type: dict[string, dict[string, string]]. Default: {}.

Mapping of service names to their identifiers.

The inner dictionary maps identifier prefixes to their source. The source indicates the service that manages the generation of new identifiers with that prefix. If the source is the same as the service name, then the service manages its own identifiers with that prefix.

Note that multiple services can manage identifiers with the same prefix!

An example configuration:

# Identifiers for the system-monitor service.
[services.system-monitor]
# The `cycle` identifier is managed by this service itself.
cycle = "system-monitor"

# Identifiers for the device service.
[services.device]
# The `run` identifier is managed by this service itself.
run = "device"

# The `cycle` identifier is managed by the system-monitor service.
cycle = "system-monitor"

See the orangeqs.juice.identifiers documentation for an advanced example.

allowed_devices_mode#

Type: string. Default: 'optional'.

Whether run identifiers must be created with an explicit allowed-device list.

In "optional" mode (the default), passing allowed_devices to orangeqs.juice.identifiers.run_id.new_run_id() is not required, and omitting it is a no-op. In "required" mode, new_run_id raises if allowed_devices is not provided.