ReactorDebugAgent 适合生产吗?
Is ReactorDebugAgent suitable for production?
我在此处阅读了如何启用 ReactorDebugAgent
:
https://projectreactor.io/docs/core/release/reference/#reactor-tools-debug
但我不知道默认启用这样的调试代理是否可行
在生产环境中还是仅在发生异常情况时才使用?
在您的 spring 主方法中添加 ReactorDebugAgent.init();
。
public static void main(String[] args) {
ReactorDebugAgent.init();
SpringApplication.run(Application.class, args);
}
依赖性:
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-tools</artifactId>
<version>3.4.13</version>
</dependency>
https://spring.io/blog/2019/03/28/reactor-debugging-experience
section name, as of 18th Feb 2022,是:
7.4. Production-ready Global Debugging
这似乎表明它确实适合用于生产。要添加更多上下文,代理:
instruments your code and adds debugging info without paying the cost of capturing the stacktrace on every operator call. The behaviour is very similar to Activating Debug Mode - aka tracebacks, but without the runtime performance overhead.
要添加更多上下文,我们一直在具有 ~500 rps 和 ~5ms 响应时间的服务中使用此代理,并且没有遇到任何问题,并且受益于装配信息的回溯
我在此处阅读了如何启用 ReactorDebugAgent
:
https://projectreactor.io/docs/core/release/reference/#reactor-tools-debug
但我不知道默认启用这样的调试代理是否可行 在生产环境中还是仅在发生异常情况时才使用?
在您的 spring 主方法中添加 ReactorDebugAgent.init();
。
public static void main(String[] args) {
ReactorDebugAgent.init();
SpringApplication.run(Application.class, args);
}
依赖性:
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-tools</artifactId>
<version>3.4.13</version>
</dependency>
https://spring.io/blog/2019/03/28/reactor-debugging-experience
section name, as of 18th Feb 2022,是:
7.4. Production-ready Global Debugging
这似乎表明它确实适合用于生产。要添加更多上下文,代理:
instruments your code and adds debugging info without paying the cost of capturing the stacktrace on every operator call. The behaviour is very similar to Activating Debug Mode - aka tracebacks, but without the runtime performance overhead.
要添加更多上下文,我们一直在具有 ~500 rps 和 ~5ms 响应时间的服务中使用此代理,并且没有遇到任何问题,并且受益于装配信息的回溯