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

tsan and asan for end to end tests #1669

Closed
esigo opened this issue Oct 9, 2022 · 4 comments · Fixed by #1670
Closed

tsan and asan for end to end tests #1669

esigo opened this issue Oct 9, 2022 · 4 comments · Fixed by #1670

Comments

@esigo
Copy link
Member

esigo commented Oct 9, 2022

We should enhance our CI with asan and tsan tests for e2e tests (examples which does not have external dependency).

@esigo esigo self-assigned this Oct 9, 2022
@lalitb
Copy link
Member

lalitb commented Oct 9, 2022

I don't see any issue in adding these examples in CI, do you think adding unit tests with multi-threaded scenarios will also catch these race conditions?

@esigo
Copy link
Member Author

esigo commented Oct 10, 2022

That should be possible, but it will look more like e2e test I think 😉

@esigo esigo added this to the Metrics v1.0.0 (GA) milestone Oct 18, 2022
@esigo
Copy link
Member Author

esigo commented Oct 18, 2022

Adding this to the metric GA milestone, as we have data races.

@lalitb
Copy link
Member

lalitb commented Oct 18, 2022

Adding this to the metric GA milestone, as we have data races.

I suspect the issue could be because observable instrument is going out of scope while the metric collection is happening. With infinite loop, we didn't see the issue. Can we test it by defining the observable instrument somewhere globally. This is also documented here:

https://github.com/open-telemetry/opentelemetry-cpp/blob/main/examples/metrics_simple/README.md

Create a Observable Counter Instrument from the Meter, and add a callback. The callback would be used to record the measurement during metrics collection. Ensure to keep the Instrument object active for the lifetime of collection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants