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

OpenTelemetry Collector Sink Broken #2571

Closed
hkfgo opened this issue Nov 7, 2024 · 11 comments
Closed

OpenTelemetry Collector Sink Broken #2571

hkfgo opened this issue Nov 7, 2024 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@hkfgo
Copy link
Collaborator

hkfgo commented Nov 7, 2024

Report

Screenshot 2024-11-01 at 2 56 36 PM The first export cycle is successful, but not subsequent ones. And it's an insidious failure that tricks CI to pass :/ We'd released many Promitor versions with this bug. The latest working version is 2.8.0.

Expected Behavior

Continuous stream of metrics exported

Actual Behavior

Only the first export is successful then nothing

Steps to Reproduce the Problem

Configure an OpenTelemetry sink like documentation describes. There will either be no metrics at all or a few data points followed by nothing.

Component

Scraper

Version

Scraper-v2.11.2

Configuration

Configuration:

# Add your scraping configuration here

Logs

example

Platform

Microsoft Azure

Contact Details

No response

@hkfgo hkfgo added the bug Something isn't working label Nov 7, 2024
Copy link

github-actions bot commented Nov 7, 2024

Thank you for opening an issue! We rely on the community to maintain Promitor. (Learn more)

Is this something you want to contribute?

@hkfgo
Copy link
Collaborator Author

hkfgo commented Nov 7, 2024

Here's more of a proof and some good news. I reverted #2239 in my test branch https://github.com/tomkerkhove/promitor/pull/2567/files, where the OpenTelemetryCollectorMetricSink.cs is reverted to the earliest version.

I was able to get OpenTelemetry tests to pass every time(I tried 3 times total). Feel free to have a look yourself. It's a little confusing because the scraper CI is marked red but only because logs on the OTEL Collector printed to stderr. The tests themselves all passed.

@hkfgo
Copy link
Collaborator Author

hkfgo commented Nov 7, 2024

I think it's safe to say that using channels in that commit broke the sink. If you still remember, do you mind explaining what concurrency issue you were trying to fix?

Although tests pass with the revert, I did observe that the metrics reported are still missing labels. I can try incorporating changes from this past commit https://github.com/tomkerkhove/promitor/pull/2183/files#diff-3860310bca8263df9a9f5b43bd3f06fdac0975d7d85467b086550aa561883316 and see if a fully working version can be produced.

@tomkerkhove
Copy link
Owner

That's very nice finding - Thank you!

I think the issue has the details on what was going on but it was not fully thread-safe. Let's see if we can get the labels working and then we can revert that PR and move forward.

@hkfgo
Copy link
Collaborator Author

hkfgo commented Nov 7, 2024

Sounds good. Let's move forward without using channels, the circle back on that concurrency issue?

@hkfgo
Copy link
Collaborator Author

hkfgo commented Nov 8, 2024

I incorporated label processing logic into the above PR. The code passed CI and is running smoothly in our staging env. I'll clean up the PR a bit and it should be in good shape to merge

@tomkerkhove
Copy link
Owner

Thanks a ton, highly appreciated!

As ref: #2567

@tomkerkhove
Copy link
Owner

Fixed in #2567, thank you very much @hkfgo!

@github-project-automation github-project-automation bot moved this from Proposed to Ready To Ship in Promitor Roadmap Nov 13, 2024
@hkfgo
Copy link
Collaborator Author

hkfgo commented Nov 19, 2024

@tomkerkhove could you cut a new release for the chart as well?

@tomkerkhove
Copy link
Owner

Sure, would you mind opening a PR to update the Helm chart and package things please? I can do it but not this week; sorry

@hkfgo
Copy link
Collaborator Author

hkfgo commented Nov 22, 2024

I filed an issue here for a better place to talk about it: promitor/charts#174

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Ready To Ship
Development

No branches or pull requests

2 participants