【发布时间】:2020-05-03 05:48:16
【问题描述】:
我正在尝试在 Wildfly 服务器上添加跟踪(特别是 Keycloak Docker 映像)
关注本文档https://docs.wildfly.org/19/Admin_Guide.html#MicroProfile_OpenTracing_SmallRye
我做到了
/extension=org.wildfly.extension.microprofile.opentracing-smallrye:add
/subsystem=microprofile-opentracing-smallrye:add
但我无法让下一部分工作以将其设置为指向 zipkin:9411
指令中的下一条命令失败
[standalone@localhost:9990 /] /subsystem=microprofile-opentracing-smallrye/jaeger-tracer=my-tracer:add()
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0030: No resource definition is registered for address [
(\"subsystem\" => \"microprofile-opentracing-smallrye\"),
(\"jaeger-tracer\" => \"my-tracer\")
]",
"rolled-back" => true
}
但是,使用 /opt/jboss/startup-scripts/ 执行此操作也会失败
Executing cli script: /opt/jboss/startup-scripts/enable-tracing.cli
No connection to the controller.
使用@ehsavoie 回答我得到了一点进一步
embed-server --admin-only=true
/extension=org.wildfly.extension.microprofile.opentracing-smallrye:add()
/subsystem=microprofile-opentracing-smallrye:add()
/subsystem=microprofile-opentracing-smallrye/jaeger-tracer=my-tracer:add()
/subsystem=microprofile-opentracing-smallrye/jaeger-tracer=my-tracer:write-attribute(name=sender-endpoint,value=http://tracing:9411)
/subsystem=microprofile-opentracing-smallrye/jaeger-tracer=my-tracer:write-attribute(name=propagation,value=[B3])
/subsystem=microprofile-opentracing-smallrye/jaeger-tracer=my-tracer:write-attribute(name=reporter-log-spans,value=true)
/subsystem=microprofile-opentracing-smallrye:write-attribute(name=default-tracer,value=my-tracer)
stop-embedded-server
但仍然没有登录到使用 B3 的 zipkin。
我也试过
/subsystem=microprofile-opentracing-smallrye/jaeger-tracer=my-tracer:write-attribute(name=sender-endpoint,value=http://tracing:9411/api/v1/spans)
【问题讨论】:
-
在删除 opentracing 扩展和子系统后,我刚刚在 WildFly 19 上尝试了您的命令,它通过了。你能把你正在使用的图片的链接放上去吗?
-
我用过
jboss/keycloak