Skip to content

Make SystemMetricsMonitor.Configuration .labels, and .dimensions public again#97

Open
mman wants to merge 1 commit intoapple:mainfrom
mman:main
Open

Make SystemMetricsMonitor.Configuration .labels, and .dimensions public again#97
mman wants to merge 1 commit intoapple:mainfrom
mman:main

Conversation

@mman
Copy link
Contributor

@mman mman commented Feb 23, 2026

This PR addresses issue #96 by allowing the SystemMetricsMonitor.Configuration to be initialized with default labels and custom dimensions to attach prometheus dimensions like pod to every collected metric like this:

let registry = PrometheusCollectorRegistry()
let factory = await PrometheusMetricsFactory(registry: registry)
MetricsSystem.bootstrap(factory)
let monitor = SystemMetricsMonitor(configuration:
    .init(labels: .init(), dimensions: [("pod", hostname)]), metricsFactory: factory, logger: logger)
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant