Skip to content

Duplicated timeseries in CollectorRegistry #3

@turque

Description

@turque

Dears,

I'm having difficulties using this module with pytest.

I split my pytest in multiples files for better organization.

Using flask-prometheus-metrics i d'nt have test problem whit, but whit this flask_monitor only first test file pass whit successful and the others fail

`self = <prometheus_client.registry.CollectorRegistry object at 0x7fe30a7c8220>, collector = prometheus_client.metrics.Histogram(request_seconds)

def register(self, collector):
    """Add a collector to the registry."""
    with self._lock:
        names = self._get_names(collector)
        duplicates = set(self._names_to_collectors).intersection(names)
        if duplicates:
          raise ValueError(
                'Duplicated timeseries in CollectorRegistry: {0}'.format(
                    duplicates))

E ValueError: Duplicated timeseries in CollectorRegistry: {'request_seconds_bucket', 'request_seconds_created', 'request_seconds_count', 'request_seconds_sum'}

env/lib/python3.8/site-packages/prometheus_client/registry.py:29: ValueError
`

if i merge all test-files the test pass whit successful.

Do you have ideia about this problem?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions