Metrics #
Pragma Engine supports exporting operational metrics for consumption by another service, such as a data visualization tool (such as Grafana) or an Application Performance Management (APM) service (such as Datadog). These metrics can be used to give you insight into the running state of your application, such as memory, CPU usage, and number of players on the platform.
You can customize your metrics to be exported, but beware of high costs. Consider rolling your own open-source stack or using a managed service provider.
Quick Guides #
Configuring metrics #
We currently use Micrometer for our metrics library. On their Concepts page, you can see descriptions of their supported monitoring systems.
Vendors can be supported by implementing the MetricsPlugin
. Several options are available out-of-box using Pragma-provided implementations utilized through configuration, such as:
In each section, we’ll provide all potential config values (if relevant) and a quick default sample if you’d like to plug and play as quickly as possible.
Datadog #
Enable Datadog on the MetricsNodeService
via plugin config using MetricsNodeService.datadogRegistryProvider
.
The only required config value is apiKey
.
Statsd #
Enable Statsd on the MetricsNodeService
via plugin config using MetricsService.statsdRegistryProvider
.
To integrate with Datadog, set theflavor
value toDATADOG
.
Prometheus #
Enable the Prometheus scrapable metrics endpoint on the MetricsNodeService
via plugin config using MetricsService.prometheusGatewayModuleProvider
. Metrics are available on the respective Operator endpoints, at /metrics
.