How to Set Up Observability and Health Monitoring for Formance Services
Last updated: February 21, 2025
Health Monitoring
Formance services provide a health check endpoint for monitoring:
Endpoint:
/_healthcheckAvailable on all services
Can be used for liveness probes
Observability with OpenTelemetry
Formance services support observability using OpenTelemetry for traces and metrics. To set this up:
1. Configure OpenTelemetry Collector
Use the following configuration in your Kubernetes cluster:
apiVersion: formance.com/v1beta1
kind: Settings
metadata:
name: stacks-otel-collector
spec:
key: opentelemetry.*.dsn
stacks:
- "your-stack-name"
value: <your-otel-collector-endpoint>Replace your-stack-name with your Formance stack name and <your-otel-collector-endpoint> with the appropriate endpoint (e.g., for Datadog: http://datadog-agent.default:4318).
2. Add Custom Attributes
To add custom attributes to your traces (e.g., environment name), use the following configuration:
apiVersion: formance.com/v1beta1
kind: Settings
metadata:
name: formance-traces-custom
spec:
key: opentelemetry.traces.resource-attributes
stacks:
- 'your-stack-name'
value: deployment.environment=production,custom.attribute=valueAdjust the value field to include the desired key-value pairs for your custom attributes, separated by commas.
Integration with Monitoring Tools
Formance's OpenTelemetry support allows integration with various monitoring tools:
Datadog: Ensure the Datadog agent is deployed on the same node as your Formance stack.
Other tools: Configure to receive data from your OpenTelemetry collector.
For specific setup instructions with your chosen monitoring tool, refer to that tool's OpenTelemetry integration documentation.