-
Notifications
You must be signed in to change notification settings - Fork 10
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
Informix Db: Parameterized Sql Trace via configuration #52
Conversation
rdb/config/config-informix.yaml
Outdated
@@ -33,6 +33,7 @@ instances: | |||
#Time Frame for which you want to get the expensive query. Default value 900 Sec | |||
db.sql.elapsed.timeframe: 900 # Values should be in Seconds | |||
db.sequential.scan.count: 0 | |||
db.sql.trace.enabled: 0 # Value should be 0 if the SQL Trace is enabled and 1 when not eneabled.When not specified, SQL Trace is considered to be disabled. |
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 should be a boolean value.
db.sql.trace.enabled: 0 # Value should be 0 if the SQL Trace is enabled and 1 when not eneabled.When not specified, SQL Trace is considered to be disabled. | |
db.sql.trace.enabled: false #Default is false. Make it true only if `SqlTrace` is enabled for the DB. |
rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java
Outdated
Show resolved
Hide resolved
rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java
Outdated
Show resolved
Hide resolved
rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java
Outdated
Show resolved
Hide resolved
@@ -65,6 +66,8 @@ public class InformixDc extends AbstractDbDc { | |||
|
|||
private final MetricsCollector metricCollector; | |||
|
|||
public boolean sqlTraceEnabled; |
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.
Do you need it to be public? I don't see you are using it anywhere outside this class.
public boolean sqlTraceEnabled; | |
private boolean isSqlTraceEnabled; |
@@ -289,11 +293,13 @@ private void getallMetrics() { | |||
|
|||
@SuppressWarnings("unchecked") | |||
private void mediumPollingInterval() { | |||
getRawMetric(DB_SQL_COUNT_NAME).setValue((Number) metricCollector.collectMetrics(DB_SQL_COUNT_NAME)); | |||
if(sqlTraceEnabled==true) { |
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 is boolean attribute why do you need == true
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.
LGTM
A parameter to specify whether SQL Tracing for Informix DB is enabled is added in the Configuration