Hi folks,
I'm having the same issue but with the undertow metrics - they are reported, but consistently as 0, despite making several HTTP requests. I'm using WildFly 29.0.1.
I made sure that the undertow subsystem has the statistics-enabled attribute turned on:
[standalone@localhost:9990 /] /subsystem=undertow:read-resource
{
"outcome" => "success",
"result" => {
"default-security-domain" => "other",
"default-server" => "default-server",
"default-servlet-container" => "default",
"default-virtual-host" => "default-host",
"instance-id" => expression "${jboss.node.name}",
"obfuscate-session-route" => false,
"statistics-enabled" => true,
"application-security-domain" => {"other" => undefined},
"buffer-cache" => {"default" => undefined},
"byte-buffer-pool" => {"default" => undefined},
"configuration" => {
"filter" => undefined,
"handler" => undefined
},
"server" => {"default-server" => undefined},
"servlet-container" => {"default" => undefined}
}
}
I made sure that the micrometer subsystem is exposing all subsystems (even tried with ["undertow"] only):
[standalone@localhost:9990 /] /subsystem=micrometer:read-resource
{
"outcome" => "success",
"result" => {
"exposed-subsystems" => ["*"],
"endpoint" => expression "${OTEL_COLLECTOR_URL}",
"step" => 1L
}
}
I made sure the wildfly.statistics-enabled and wildfly.undertow.statistics-enabled system props are set to true.
I tried with and without the metrics subsystem enabled - same result. One thing I did notice is that when the metrics subsystem is enabled, it doesn't report any undertow metrics at all (not even at 0). I suspect these issues might be related.
If it helps,
here is the config I'm using, slightly modified to remove the management HTTPS port. And the CLI commands I'm using to enable micrometer:
if (outcome != success) of /extension=org.wildfly.extension.micrometer:read-resource
/extension=org.wildfly.extension.micrometer:add
/subsystem=micrometer:add()
end-if
/subsystem=micrometer:write-attribute(name=endpoint, value="${OTEL_COLLECTOR_URL}")
/subsystem=micrometer:write-attribute(name=step, value=1)
/subsystem=undertow:write-attribute(name=statistics-enabled, value=true)
And of course I'm reloading the server after this (and also tried shutdown --restart=true)
I have run out of ideas to pursue - I have tried going through the WildFly code but couldn't find any reason for the behaviour. Some help or guidance would be much appreciated.
Thanks for your time!
Kind regards,
Rudi Araújo.