Skip to main content

Operating Modes

The Reporter supports two modes that can run simultaneously. Configuration requirements depend on which mode(s) you use.
ModeRequired propertiesOptional dependency
Consoleflowwarden.api-key + flowwarden.reporter.console-url
PrometheusNonemicrometer-core on classpath
Bothflowwarden.api-key + flowwarden.reporter.console-urlmicrometer-core on classpath

Properties

Console mode

PropertyTypeDefaultDescription
flowwarden.api-keyStringAPI key for authenticating with the FlowWarden Console. Required only when console-url is configured.
flowwarden.reporter.console-urlStringURL of the FlowWarden Console (e.g. https://console.flowwarden.io). Triggers Console mode when present.

General

PropertyTypeDefaultDescription
flowwarden.reporter.enabledbooleantrueEnable or disable the Reporter entirely. When false, no Reporter beans are created.
flowwarden.reporter.environmentStringauto-detectedLogical environment name (e.g. production, staging). If not set, resolved automatically (see Instance Identity).
flowwarden.reporter.heartbeat-interval-secondsint30Initial heartbeat interval in seconds. Dynamically adjusted by the Console via the next_heartbeat_in field in the ACK response.
flowwarden.reporter.encryption.enabledbooleantrueEnable AES-GCM encryption of payloads sent to the Console.

Example Configurations

flowwarden:
  api-key: ${FLOWWARDEN_API_KEY}

  reporter:
    console-url: https://console.flowwarden.io
    environment: production

Validation Rules

The Reporter validates its configuration at startup based on what is configured:
ConditionBehavior
console-url present + api-key missingApplication fails to start with a clear error (see below)
api-key present + console-url missingWarning logged: Console mode disabled. App starts normally.
No console-url + no MeterRegistry on classpathWarning logged: No output configured. App starts in NoOp mode.
MeterRegistry on classpath (regardless of above)Prometheus mode activated automatically.

Fail-fast error (Console mode misconfigured)

***************************
APPLICATION FAILED TO START
***************************

Description:

FlowWarden Reporter Console mode requires 'flowwarden.api-key'
when 'flowwarden.reporter.console-url' is configured.

Action:

Either:
1. Set 'flowwarden.api-key' in your application properties or environment variables
2. Remove 'flowwarden.reporter.console-url' to use local Prometheus mode only
3. Disable the reporter with 'flowwarden.reporter.enabled=false'
Use environment variables for sensitive values like the API key:
flowwarden:
  api-key: ${FLOWWARDEN_API_KEY}

Prometheus Metrics

When a MeterRegistry is available, the Reporter registers these Micrometer meters:
MetricTypeTagsDescription
flowwarden_stream_events_totalFunctionCounterstream, statusTotal events processed (monotonic)
flowwarden_stream_lag_msGaugestreamCurrent consumer lag in milliseconds
flowwarden_stream_dlq_sizeGaugestreamDLQ events in the current window
Naming follows Prometheus conventions (snake_case, underscores).

Disabling the Reporter

Set flowwarden.reporter.enabled=false to completely disable the Reporter. No beans are created, no heartbeats are sent, and the StreamMetricsProvider SPI remains at its default no-op implementation. This is useful for:
  • Local development without a Console or Prometheus
  • Test environments where monitoring is not needed
  • Temporarily disabling reporting without removing the dependency

Overriding Beans

All Reporter beans are registered with @ConditionalOnMissingBean, so you can replace any of them with your own implementation:
@Bean
public PayloadEncoder customPayloadEncoder() {
    // Your custom encoding logic
    return new MyCustomPayloadEncoder();
}
Replaceable beans: InstanceIdentifier, StreamMetricsAggregator, ReporterMetricsProvider, SystemMetricsCollector, PayloadEncoder, HeartbeatSender, FlowWardenMicrometerReporter.

See Also

Instance Identity

How hostname and environment are auto-detected.

Heartbeat & Metrics

What data the Reporter sends to the Console.