Advanced monitoring configuration for Sophra’s observability pipeline
metricsConfig
object exports the following configuration options:
eventLoopMonitoring
boolean
true
gcMonitoring
boolean
true
defaultLabels
Object
{ app: "sophra", environment: process.env.NODE_ENV || "development" }
prefix
string
"sophra_"
collectDefaultMetrics
boolean
true
defaultMetricsInterval
number
10000
metricsConfig
settings, including the setup of custom metrics that adhere to the configured prefix and labeling conventions.
Metric Collection and Reporting Flow
defaultMetricsInterval
can be adjusted to balance between metric granularity and collection overhead.eventLoopMonitoring
and gcMonitoring
allow for fine-grained control over the performance impact of monitoring.defaultMetricsInterval
to reduce the frequency of metric collection, trading off some granularity for reduced overhead.{prefix}{metric_name}_{unit}
Example: sophra_http_requests_total