Replies: 1 comment
-
Generally speaking, I feel that unit tests are not really the proper place to test such code style / architectural patterns. I suggest investigating Trace based testing instead as a possible way to assert presence of required spans in a running environment. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Suppose I have this:
I want to be able to test that a span was emitted. Sure, I can launch the app and look at the exported spans, but I want to test-drive behavior, not desk-check it manually.
So I tried:
Which doesn't work. I also tried it with the
@Micronaut
annotation, tried it in the context of a full HTTP roundtrip, and tried@Inject
ing theInMemorySpanExporter
into the test. No luck with any of these.Any guidance on how to (preferably unit) test this behavior would be very welcome.
Beta Was this translation helpful? Give feedback.
All reactions