Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArraySegment ArgumentException in PrometheusCollectionManager on results write #5709

Closed
artem-voropaev opened this issue Jun 21, 2024 · 2 comments
Labels
bug Something isn't working pkg:OpenTelemetry.Exporter.Prometheus.AspNetCore Issues related to OpenTelemetry.Exporter.Prometheus.AspNetCore NuGet package

Comments

@artem-voropaev
Copy link

artem-voropaev commented Jun 21, 2024

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

@artem-voropaev artem-voropaev added the bug Something isn't working label Jun 21, 2024
@github-actions github-actions bot added the pkg:OpenTelemetry.Exporter.Prometheus.AspNetCore Issues related to OpenTelemetry.Exporter.Prometheus.AspNetCore NuGet package label Jun 21, 2024
@vishweshbankwar
Copy link
Member

#5676 should fix this.

@vishweshbankwar
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:OpenTelemetry.Exporter.Prometheus.AspNetCore Issues related to OpenTelemetry.Exporter.Prometheus.AspNetCore NuGet package
Projects
None yet
Development

No branches or pull requests

2 participants