-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WFLY-18582] Add prometheus endpoint to micrometer extension #17857
base: main
Are you sure you want to change the base?
Conversation
c095d7e
to
15839cb
Compare
12dcfc8
to
33185af
Compare
f97ce30
to
fd403a0
Compare
/retest |
@@ -0,0 +1,31 @@ | |||
package org.wildfly.extension.micrometer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs the copyright/license header.
@@ -0,0 +1,102 @@ | |||
package org.wildfly.extension.micrometer.otlp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
header
@@ -0,0 +1,95 @@ | |||
package org.wildfly.extension.micrometer.registry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
header
@@ -0,0 +1,105 @@ | |||
package org.wildfly.extension.micrometer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
header
.addAttributes(MicrometerSubsystemRegistrar.ENDPOINT, | ||
MicrometerSubsystemRegistrar.STEP) | ||
.setXmlElementName("otlp-registry") | ||
.build() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AIUI the if and else clauses do the same thing. Should the 'addChild' statement be removed from the 'else'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that's a good catch. The issue here is that the model is changing, but the XML structure is not, and it looks like a little noise was left here in trying to figure out how to handle that correctly. The two branches are slightly different in the the attribute defs come from different places, though the defs themselves are identical, so that is probably a "distinction without a difference". :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, well. Not QUITE identical. The definition on MicrometerSubsystemRegistrar
includes .addFlag(AttributeAccess.Flag.ALIAS)
which I added, iirc, due to some runtime errors at one point related to attribute translation. That might also be noise. @pferraro ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The set of attributes of the root resource should be different between version 1.0 and 2.0, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably. I'll dig into that.
...ter/src/main/java/org/wildfly/extension/micrometer/otlp/OtlpRegistryDefinitionRegistrar.java
Outdated
Show resolved
Hide resolved
// } | ||
// } | ||
|
||
private Meter.Id addCounter(WildFlyMetric metric, MetricMetadata metadata) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of that class is no longer used. The class itself may be superfluous. I'll verify then do the needful.
...ometer/src/main/java/org/wildfly/extension/micrometer/registry/WildFlyCompositeRegistry.java
Outdated
Show resolved
Hide resolved
...micrometer/src/test/java/org/wildfly/extension/micrometer/MicrometerTransformerTestCase.java
Outdated
Show resolved
Hide resolved
@@ -29,6 +30,8 @@ public class MicrometerSetupTask extends AbstractSetupTask { | |||
|
|||
@Override | |||
public void setup(final ManagementClient managementClient, String containerId) throws Exception { | |||
otelCollector = OpenTelemetryCollectorContainer.getInstance(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the 'dockerAvailable' handling being dropped? Is this because WFARQ properly handles failures from OpenTelemetryCollectorContainer.getInstance() now?
If so I believe 'dockerAvailable" can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That check is being done in the test itself:
@BeforeClass
public static void checkForDocker() {
AssumeTestGroupUtil.assumeDockerAvailable();
}
Introduce new model/schema version Move OTLP-related attributes to a child resource Update test to reflect model change
Dependency Tree Analyzer Output: New Dependencies:
CC @wildfly/prod |
d14cb4d
to
8fa5934
Compare
Add prometheus support Add tests for Prometheus context
https://issues.redhat.com/browse/WFLY-18582
More information about the wildfly-bot[bot]