Skip to content

ArraySegment ArgumentException in PrometheusCollectionManager on results write #5709

@artem-voropaev

Description

@artem-voropaev

Package

OpenTelemetry.Exporter.Prometheus.AspNetCore

Package Version

Package Name Version
OpenTelemetry 1.9.0
OpenTelemetry.Exporter.Prometheus.AspNetCore 1.9.0-beta.1
OpenTelemetry.Extensions.Hosting 1.9.0
OpenTelemetry.Instrumentation.AspNetCore 1.8.1
OpenTelemetry.Instrumentation.Http 1.8.1
OpenTelemetry.Instrumentation.Process 0.5.0-beta.5
OpenTelemetry.Instrumentation.Runtime 1.8.1

Runtime Version

net6.0

Description

On collect metrics exception thrown in PrometheusCollectionManager
CallStack:
System.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection. at System.ArraySegment1..ctor(T[] array, Int32 offset, Int32 count)
at OpenTelemetry.Exporter.Prometheus.PrometheusCollectionManager.OnCollect(Batch1 metrics)

Screenshot:
image

Steps to Reproduce

See Desc.

Expected Result

Metrics returned

Actual Result

After some time, metrics not returned.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions