-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
Activity/OpenTelemetry support #496
Comments
First I want to make sure I'm understanding the underlying problem/motivations. |
Yeah absolutely. The underlying motivations are the ability to get determine failures during test runs to investigate issues. This doesn't come up as much in strictly unit tests but it much more useful for things like integration tests, where something could be failing in a number of subsystems. Specifically, in FsAutocomplete, it could be in Project Cracking, FSharp Compiler service, or some other subsystem of FsAutocomplete. Sometimes tests only fail in things like CI or in extreme parallelism where a singular focused test it will pass, and obtaining logs specific to those tests can be tricky. This article https://www.honeycomb.io/blog/monitoring-unit-tests-opentelemetry might shine a bit more light on the subject. |
If I'm understanding right, you want to add a trace or span to better group telemetry by test. If this is the case, I'm not opposed to the idea of adding open telemetry, but I also feel like access to the full test name is a more general problem that lots of extensions would want solved if we can solve it generally |
Yeah, there's a few other piece of info that would be "nice" to have as well, such as adding adding exception/TestOutcome information. I can send a PR so we can discuss what it would look like. But yeah if there's better ways to expose the info so it's easier to create wrapper's I'm for it. |
For future readers, the conversation continued in PR #497 The general approach was to map the test list with an open telemetry wrapper. This does have the downside that it doesn't centrally apply to tests discovered using reflection via |
👋 Would y'all be open to adding Activity/OpenTelemetry support in Expecto? I would usually wrap the tests in my own
testCase
but the main issue is it won't have the whole name since the test itself won't be aFlatTest
.This wouldn't be adding any dependencies as ActivitySource/Activity is already in .net itself. I think adding an ActivitySource to the
ExpectoConfig
and then using it in theexecTestAsync
would be the most straight forward approach.Some resources to read:
The text was updated successfully, but these errors were encountered: