How to ensure your business-critical KPIs reach OpsPilot and Grafana
While FusionReactor’s native OTel support simplifies standard observability, successfully capturing custom application metrics (from OTel SDK or ColdFusion/Lucee) requires adherence to a critical distinction. The key to maintaining your business-critical KPIs in OpsPilot is the Golden Rule: traces and logs go via OTLP, but metrics must be sent via Prometheus Remote Write. To ensure a seamless transition and continuous data flow, you must use the otel/opentelemetry-collector-contrib image, explicitly initialize the OTel SDK to point to your collector, and configure the prometheusremotewrite exporter targeting https://api.fusionreactor.io/v1/metrics with your OpsPilot API Key in the authorization header. For full technical details, consult the OTel shipping with FusionReactor documentation.
While the native OTel features introduced in version 2025.2.0 revolutionized how FusionReactor handles data, our latest 2026.1.1 agent is the most robust version yet for managing these pipelines. However, as you modernize your stack, there is one critical distinction you must understand to avoid losing visibility: Custom Application Metrics.
The “GlobalOpenTelemetry” Catch
The FusionReactor agent is a powerhouse for FR-native telemetry, but it does not populate GlobalOpenTelemetry. If your Java code relies on the OTel SDK (e.g., GlobalOpenTelemetry.getMeter(…)) to emit custom KPIs like order counts, queue depths, or cache hit rates, simply removing your old standalone OTel agent will turn those metrics into no-ops.
To keep your custom business data flowing, you have two paths:
- Maintain a dual-agent setup: Keep the standalone OTel Java agent running alongside the FR agent specifically to handle custom SDK instrumentation.
- Manual SDK Initialization: Explicitly initialize the OTel SDK within your application code to point directly to your collector, allowing you to remove the second agent.
The Secret to OpsPilot Metrics: Prometheus Remote Write
One of the most important technical shifts in the modern agent architecture is how OpsPilot ingests data. While traces and logs use standard OTLP HTTP, OpsPilot ingests metrics via Prometheus Remote Write.
If you are using an OTel Collector to forward custom metrics, your collector.yaml must reflect this distinction. Using standard OTLP for metrics will result in data not being ingested.
exporters:
# Metrics MUST use prometheusremotewrite for OpsPilot
prometheusremotewrite/opspilot:
endpoint: https://api.fusionreactor.io/v1/metrics
headers:
authorization: "${env:FR_API_KEY}"
# Traces and Logs use standard OTLP HTTP
otlphttp/opspilot:
endpoint: https://api.fusionreactor.io
headers:
authorization: "${env:FR_API_KEY}"
A Note for ColdFusion & Lucee Users
If you use FRAPI.postMetric() or postNumericAggregateMetric(), remember that these values are written to the local FusionReactor instance only. They are visible in the local web UI but are not automatically shipped to the cloud.
To get CFML application metrics into OpsPilot, they must be sent via OTLP to an OTel Collector, which then forwards them using the Prometheus Remote Write exporter mentioned above.
Summary Checklist for Custom Metrics
- Use the “Contrib” Image: Standard OTel collector images don’t always include the required exporter. Ensure you use otel/opentelemetry-collector-contrib.
- Check Your Headers: OpsPilot requires your API Key (found in Account Settings > API Keys) in the authorization header. Crucial: Do not include the “Bearer ” prefix if configuring this manually in your collector.
- Verify in OpsPilot: Once your collector is running, head to Explore > Metrics in the FusionReactor Cloud UI to confirm your custom KPIs are arriving.
Ready to migrate? For deep-dive code examples and full configuration files, check out our guide: Migrating from a dual OTel + FR agent setup.
Need help with your specific config? Reach out to the team at support@opspilot.com or use the chat bubble in our documentation.
