Conversation
|
I'm still thinking over generalization approaches. I haven't found a clear nice answer yet. Have you considered how the current span approach would behave with stress testing? |
|
Oh one of the things missing too is how to integrate with |
|
Good point. That's a problem for shuffle and filter too. Seems like exposing such a method would be desirable for library extension. |
|
Upon review, I think I got wrap up in my own line of thought and didn't interpret your statement correctly. I'm not sure I see the incompatibility with |
|
As far as I know, dotnet test doesn't care whats in your main/entrypoint. Yolodev uses Expecto.Impl.testFromAssembly to find tests. I suppose you can call Specifically the tricks that @baronfel has in https://github.com/baronfel/otel-startup-hook |
|
Interesting. I hadn't thought of such a limitation. Tests names can be listed via dotnet run, but that doesn't provide fully-hydrated Test records. |
|
So creating the TraceProvider statically: do
let provider = traceProvider()
AppDomain.CurrentDomain.ProcessExit.Add(fun _ -> provider.Dispose())And After that, this does work for |
This can demonstrate tests showing in OTel
40068a0 to
6da8ec1
Compare
|
👋 Long time no push. I'm thinking I'd want to try to get this into Expecto. What do you think would be the acceptance for this? Somethings come to mind:
|
|
I scanned over the code again. It looks like the essence of the change is concentrated in OpenTelemetry.fs and a test. A few items we'd want to address
|
I used the Aspire dashboard. You can run it via docker:
Then you can run the
Expecto.Testsproject. It should export OpenTelemetry traces to Aspire.Example of traces for tests showing up:
Clicking View on one of them with a red dot (red dot indicates there were exceptions/errors):
Clicking on the top span, you can see details about its run.
Clicking on one of the child spans you can see details such as Exception data.
I didn't show it here but you can also export logs that are associated with a test trace.