OpenTelemetry instrumentation for xUnit tests#18230
Conversation
✅ No release notes required |
|
Locally I don't see any significant performance penalty for enabling this. |
psfinaki
left a comment
There was a problem hiding this comment.
That's cool, thank you!
| log "FSharpXunitFramework with XUNIT_EXTRAS installing TestConsole redirection" | ||
| TestConsole.install() | ||
|
|
||
| // TODO: Currently does not work with Desktop .NET Framework. Upcoming OpenTelemetry 1.11.0 may change it. |
There was a problem hiding this comment.
out of curiosity, what makes you think 1.11 will enable .NET Framework support for OTel? I don't see anything in the release notes or changelog to suggest that.
There was a problem hiding this comment.
They say they're dropping the quasi-deprecated gRpc.Core. When I tried it here, grpc just fails silently (exception can be observed in debug mode) during runtime on desktop target.
There was a problem hiding this comment.
May be wishful thinking on my part, though!
There was a problem hiding this comment.
I just did a quick test with console app. Otel 1.9.0 does work in general with net472, just not here in this repo, for some reason.
Some tests were already instrumented ad-hoc.
This applies the instrumentation to the whole test assembly instead, so no additional work is needed to capture any test case.
Also replace deprecated Jaeger package.
It seems to work locally, at least with the net9.0 target.
Traces can be inspected in Jager all-in-one. If nothing interesting is produced, at least the test case name and duration is captured.