Skip to content

[Bug] Race Condition in hashicorp/go-metrics PrometheusSink #25499

@fridrik01

Description

@fridrik01

I identified a race condition in the Cosmos SDK's telemetry dependency of hashicorp/go-metrics. The bug is in PrometheusSink when multiple goroutines create the same metric concurrently, metric updates can be lost.

I've pushed a fix for this and created a PR in the upstream repo with tests demonstrating the issue and verifying the solution.

However, I haven't seen any updates on that PR, pointing to hashicorp/go-metrics having little maintenance activity. Could the Cosmos SDK team help get this merged upstream? This affects all Cosmos SDK applications using Prometheus metrics and can cause incorrect metric values in production environments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions