Skip to content

🚀: [Metrics] Allow adding metadata to structured sinks #203

@Nek-12

Description

@Nek-12

Currently, our OtlpJsonMetricsSink allows clients to attach custom metadata (like install_id or device_model) using resourceAttributes and resourceAttributesProvider. However, our other structured sinks (like OpenMetricsSink) do not have this capability.
This means clients using Prometheus or OpenMetrics have to manually re-parse the emitted string to inject their own custom properties, which is error-prone and inefficient.

Goal

Update OpenMetricsSink (and ALL other structured sinks where applicable) to accept custom resource attributes natively, matching the API we already have in OtlpJsonMetricsSink.

  • new test per provider verifying these attributes are supported
  • default parameter value like emptyMap() for backward compat

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions