Replies: 5 comments
-
It's true that it's not documented in a guide yet, can you please open an issue? Meanwhile you can have a look at the tests, it should be quite easy to understand how to use spies (in tests, they don't make sense for production usage) https://github.com/smallrye/smallrye-mutiny/blob/main/implementation/src/test/java/io/smallrye/mutiny/helpers/spies/SpyTest.java |
Beta Was this translation helpful? Give feedback.
-
Just created an issue: #1082 Why wouldn't this make sense for production? I have been implementing custom solutions to track a Uni in production (number of failures/retries, capture exceptions in a container, total execution time). Wouldn't a spy make sense for this use case? |
Beta Was this translation helpful? Give feedback.
-
Spies were created with testing in mind, hence my remark, but feel free to
explore production usage ;-)
…On Thu, Oct 13, 2022 at 6:58 AM Antony ***@***.***> wrote:
Just created an issue: #1082
<#1082>
Why wouldn't this make sense for production? I have been implementing
custom solutions to track a Uni in production (number of failures/retries,
capture exceptions in a container, total execution time). Wouldn't a spy
make sense for this use case?
—
Reply to this email directly, view it on GitHub
<#1079 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAGK2NO4I5I5BDZ7IYZJXTWC6JHXANCNFSM6AAAAAARC5A5OA>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Hmm... this sounds interesting. |
Beta Was this translation helpful? Give feedback.
-
Yes, for my use case I want to expose metrics, something similar to what Fault Tolerance (https://smallrye.io/docs/smallrye-fault-tolerance/5.5.0/integration/metrics.html) offers (specifically with Quarkus where you can just expose metrics through config). I have been adding custom (and awkward) code to track some metrics, maybe Spies can be a good solution for metrics, need to try it... or maybe add a full API to track metrics in the future? |
Beta Was this translation helpful? Give feedback.
-
Hi,
can we please get some examples to use Spies (https://javadoc.io/doc/io.smallrye.reactive/mutiny/latest/io.smallrye.mutiny/io/smallrye/mutiny/helpers/spies/Spy.html)? Can't find any info in documentation.
Beta Was this translation helpful? Give feedback.
All reactions