Skip to content

Wrong otel metric types #3612

@jvujcic

Description

@jvujcic

Issue tracker is used for reporting bugs and discussing new features. Please use
stackoverflow for supporting issues.

db.client.connections.timeouts metric defined here

timeouts, err := conf.meter.Int64ObservableUpDownCounter(

is defined as Int64ObservableUpDownCounter but according to otel conventions
it should be a counter

Also, db.client.connections.waits, db.client.connections.hits and db.client.connections.misses should also be counter

Expected Behavior

db.client.connections.timeouts, db.client.connections.waits, db.client.connections.hits and db.client.connections.misses should be defined as Counter

Current Behavior

db.client.connections.timeouts, db.client.connections.waits, db.client.connections.hits and db.client.connections.misses are defined as UpDownCounter

Possible Solution

Steps to Reproduce

Context (Environment)

When using prometheus exporter the UpDownCounter is exported as a Gauge and it is not possible to use for example rate function.

Detailed Description

Either change current metric types (which is a breaking change) or create new correct metrics.

Possible Implementation

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions