Skip to content
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-18952] Migrate operations for MP OpenTracing and MP Metrics are failing #17559

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,16 @@ private void addOpenTelemetryExtension(final OperationContext context,

private void addOpenTelemetrySubsystem(final OperationContext context,
final Map<PathAddress, ModelNode> migrateOperations) {
Resource root = context.readResourceFromRoot(PathAddress.EMPTY_ADDRESS, false);
PathAddress parentAddress = context.getCurrentAddress().getParent();
Resource root = context.readResourceFromRoot(parentAddress, false);
if (root.hasChild(OPENTELEMETRY_SUBSYSTEM_ELEMENT)) {
return; // subsystem is already added, nothing to do

}

PathAddress address = pathAddress(OPENTELEMETRY_SUBSYSTEM_ELEMENT);
jasondlee marked this conversation as resolved.
Show resolved Hide resolved
final ModelNode operation = Util.createAddOperation(address);
migrateOperations.put(address, operation);
PathAddress subsystemAddress = parentAddress.append(OPENTELEMETRY_SUBSYSTEM_ELEMENT);
final ModelNode operation = Util.createAddOperation(subsystemAddress);
migrateOperations.put(subsystemAddress, operation);
}

private void removeOpentracingSubsystem(final PathAddress address,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
public class MicroProfileMetricsExtension extends AbstractLegacyExtension {

static final String EXTENSION_NAME = "org.wildfly.extension.microprofile.metrics.smallrye";
static final String EXTENSION_NAME = "org.wildfly.extension.microprofile.metrics-smallrye";

/**
* The name of our subsystem within the model.
Expand Down