-
Notifications
You must be signed in to change notification settings - Fork 83
Forbidden fields are now ignored #240
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright (c) 2017, 2022, Oracle and/or its affiliates. | ||
// Copyright (c) 2017, 2023, Oracle and/or its affiliates. | ||
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
package com.oracle.wls.exporter.domain; | ||
|
@@ -24,6 +24,10 @@ | |
* @author Russell Gold | ||
*/ | ||
public class ExporterConfig implements MetricsProcessor { | ||
// Due to a bug in the WLS REST API, a query that includes this field will fail if not run with admin privileges. | ||
// The code thus ensures that it is excluded from all queries. | ||
private static final String[] FORBIDDEN_FIELDS = {"JDBCServiceRuntime:JDBCDataSourceRuntimeMBeans:properties"}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just curious... Is this the only affected field or just the only one that we know about? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's the only one we've found so far. But I have written the exclusion code to make it easy to add others if we find them. |
||
|
||
public static final String DOMAIN_NAME_PROPERTY = "DOMAIN"; | ||
|
||
private static final String QUERY_SYNC = "query_sync"; | ||
|
@@ -173,7 +177,7 @@ private QuerySyncConfiguration loadQuerySync(Object o) { | |
|
||
private void appendQueries(Object queriesYaml) { | ||
for (Map<String,Object> selectorSpec : getAsListOfMaps(queriesYaml)) { | ||
appendQuery(MBeanSelector.create(selectorSpec)); | ||
appendQuery(MBeanSelector.create(selectorSpec).withForbiddenFields(FORBIDDEN_FIELDS)); | ||
} | ||
} | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.
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.
Can this text come from a resource bundle?
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.
Actually, nevermind. This is for an internal error. If it's easy then do it, but it's not critical.
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.
It could; actually, it could probably be removed, since I know have altered the code to exclude it.