How to configure custom environment variables and OTEL_RESOURCE_ATTRIBUTES using the operator
Last updated: September 8, 2025
You can configure custom OTEL_RESOURCE_ATTRIBUTES for your auth, ledger, and gateway services using the Formance operator through Settings configuration.
Configuration
To set custom environment variables via OTEL_RESOURCE_ATTRIBUTES, create a Settings resource with the following configuration:
apiVersion: formance.com/v1beta1
kind: Settings
metadata:
name: opentelemetry-resource-attributes
spec:
key: opentelemetry.*.resource-attributes
stacks:
- '*'
value: key1=value1,key2=value2Key Configuration Options
The key field supports flexible targeting:
Use wildcard
*to apply to all OpenTelemetry components:opentelemetry.*.resource-attributesTarget specific components by replacing
*withtracesormetrics
The stacks field can be set to ['*'] to apply the configuration to all stacks, or specify particular stack names.
In the value field, provide your custom resource attributes as comma-separated key-value pairs.
For more detailed configuration options, refer to the Settings configuration reference.