Release version
APIOps Toolkit for Azure APIM v7.0.0-alpha.1.0.3
Describe the bug
The extractor writes the wrong loggerId for workspace-scoped diagnostics that reference workspace-scoped loggers. This causes the publisher to fail when publishing the diagnostic.
Expected behavior
The diagnosticInformation.json file should look like:
{
"properties": {
"loggerId": "/workspaces/[workspacename]/loggers/[name]"
}
}
Actual behavior
The diagnosticInformation.json file looks like:
{
"properties": {
"loggerId": "/loggers/[name]"
}
}
Reproduction Steps
- Add an application insights resource to the workspace (workspace -> Application insights).
- Create a diagnostic that references the application insights resource (workspace -> APIs -> All APIs -> Settings).
- Run the extractor.
/artifacts/workspaces/workspaceName/diagnostics/diagnosticName/diagnosticInformation.json will have a service-level loggerId, not a workspace-level loggerId.
- Run the publisher. It will fail with:
Could not obtain mandatory reference to WorkspaceLoggerResource in property LoggerId of DTO workspaces/name/diagnostics/name. Expected '/loggers/name' to match the format '.../workspaces/workspaceName/loggers/{name}'.'
Release version
APIOps Toolkit for Azure APIM v7.0.0-alpha.1.0.3
Describe the bug
The extractor writes the wrong
loggerIdfor workspace-scoped diagnostics that reference workspace-scoped loggers. This causes the publisher to fail when publishing the diagnostic.Expected behavior
The
diagnosticInformation.jsonfile should look like:{ "properties": { "loggerId": "/workspaces/[workspacename]/loggers/[name]" } }Actual behavior
The
diagnosticInformation.jsonfile looks like:{ "properties": { "loggerId": "/loggers/[name]" } }Reproduction Steps
/artifacts/workspaces/workspaceName/diagnostics/diagnosticName/diagnosticInformation.jsonwill have a service-level loggerId, not a workspace-level loggerId.