From 23f2fcb49a78a7941aa41d6b5faaf7c38b7eddc7 Mon Sep 17 00:00:00 2001 From: Rui Liu Date: Mon, 8 Jul 2024 12:30:45 +0800 Subject: [PATCH 1/8] Update doc to describe parameters (#51) --- CHANGELOG.md | 13 ++++++++++++- README.md | 20 +++++++++++++++----- docs/developer/new-db.md | 2 +- host/README.md | 40 +++++++++++++++++++++------------------- rdb/README.md | 15 +-------------- 5 files changed, 50 insertions(+), 40 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dbbc98..ab8ed0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,4 +11,15 @@ _2023-11-14_ _2023-12-26_ -- Restructure code to support different types of plugins \ No newline at end of file +- Restructure code to support different types of plugins + +_2024_3_27_ + +- Support OTel environment variables: OTEL_EXPORTER_OTLP_HEADERS & OTEL_EXPORTER_OTLP_CERTIFICATE + +_2026-6-27_ + +- Add SNMP support +- Sdk vault integration + + diff --git a/README.md b/README.md index 9f831a0..0127309 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,29 @@ -# ODCD (OpenTelemetry Data Collector for Telemetry Data) +# ODCD (OpenTelemetry Data Collector Divers) **[Semantic Convention](docs/semconv)** | -**[Support](docs/support/README.md)** | **[Changelog](CHANGELOG.md)** | **[Contributing](CONTRIBUTING.md)** | **[License](LICENSE)** --- -ODCD (OpenTelemetry Data Collector for Telemetry Data) is a collection of stanalone OpenTelemetry receivers for databases, systems, and apps. All implementations are based on predefined OpenTelemetry Semantic Conventions. A standard OTLP exporter is provided to forward the data from this "Data Collector" to a Telemetry backend or an OpenTelemetry Collector. +ODCD (OpenTelemetry Data Collector Divers) is a collection of stanalone OpenTelemetry receivers for databases, systems, apps, ant etc. All implementations are based on predefined OpenTelemetry Semantic Conventions. A standard OTLP exporter is provided to forward the data from this "Data Collector" to a Telemetry backend or an OpenTelemetry Collector. +
-

-# Data Collectors provided +## Data Collectors provided - [OTel Data Collectors for Relational Databases](rdb/README.md) (**Java 8+**) - [OTel Data Collectors for Host](host/README.md) (**Java 11+**) - [OTel Data Collectors for LLM](llm/README.md) (**Java 11+**) + +## Common Parameters for Data Collectors + +| Parameter | Scope | Description | Example | +|---------------------------|-----------|-----------------------------------------------------------------------------------------------------------------------|------------------------| +| otel.backend.url | instance | The otlp URL of the OTel Backend. E.g., http://localhost:4317 (grpc) or http://localhost:4318/v1/metrics (http) | http://127.0.0.1:4317 | +| otel.backend.using.http | instance | false (default, using otlp/grpc) or true (using otlp/http) | false | +| otel.service.name | instance | The OTel Service name (It is requred by OTel) | DamengDC | +| otel.service.instance.id | instance | The OTel Service instance ID (which is ID of this database entity. It can be generated by DC if it is not provided) | 1.2.3.4:5236@MYDB | +| poll.interval | instance | The time interval in seconds to query metrics | 25 | +| callback.interval | instance | The time interval in seconds to post data to backend | 30 | diff --git a/docs/developer/new-db.md b/docs/developer/new-db.md index fe422e2..61752e9 100644 --- a/docs/developer/new-db.md +++ b/docs/developer/new-db.md @@ -55,7 +55,7 @@ Here is the list of redefined database and OTel parameters: | otel.backend.using.http | false (default, using otlp/grpc) or true (using otlp/http) | false | | otel.service.name | The OTel Service name (It is requred by OTel) | DamengDC | | otel.service.instance.id | The OTel Service instance ID (which is ID of this database entity. It can be generated by DC if it is not provided) | 1.2.3.4:5236@MYDB | -| poll.interval | The time interval in seconds to query metrics | 20 | +| poll.interval | The time interval in seconds to query metrics | 25 | | callback.interval | The time interval in seconds to post data to backend | 30 | | db.entity.parent.id | It there is a parent of this entity, set to the otel.service.instance.id of the parent | cluster@OBCluster1 | diff --git a/host/README.md b/host/README.md index 6ca4cff..1e1e49c 100644 --- a/host/README.md +++ b/host/README.md @@ -1,16 +1,3 @@ -# ODCD (OpenTelemetry Data Collector for Telemetry Data) - -**[Semantic Convention](../docs/semconv)** | -**[Support](../docs/support/README.md)** | -**[Changelog](../CHANGELOG.md)** | -**[Contributing](../CONTRIBUTING.md)** | -**[License](../LICENSE)** - ---- -ODCD (OpenTelemetry Data Collector for Telemetry Data) is a collection of stanalone OpenTelemetry receivers for databases, systems, and apps. All implementations are based on predefined OpenTelemetry Semantic Conventions. A standard OTLP exporter is provided to forward the data from this "Data Collector" to a Telemetry backend or an OpenTelemetry Collector. - -

- # Data Collector for Hosts @@ -53,18 +40,33 @@ Refine configuration file (config/config.yaml) according to your host. Right now export DC_CONFIG=config/config-mqappliance.yaml ``` -Notes for some parameters: -- `otel.backend.url`:The OTel gRPC address of the OTel backends, for example Instana Agent (as OTel Backend): http://localhost:4317 -- `otel.service.name`:The Data Collector name, which can be any string you choose. - 4) Run Data Collector Run the Data Collector with the following command according to your current system: ```bash nohup ./bin/otel-dc-host ``` - -## Build & Run (for develpers) +## Common Parameters for Host Data Collectors + +| Parameter | Scope | Description | Example | +|--------------------|-----------------------|-----------------------------------------------------------------------------|---------------------------| +| host.system | global | The engine of this host data collector | snmp_host or mq_appliance | +| snmp.host | instance/snmp_host | The endpoint of SNMP host | udp:9.112.252.102/161 | +| host.name | instance/snmp_host | Optional: use this to overwrite the value got by SNMP | stantest0.fyre.ibm.com | +| os.type | instance/snmp_host | Optional: use this to overwrite the value got by SNMP | linux | +| community | instance/snmp_host | Optional: The community string (default: public) | public | +| retries | instance/snmp_host | Optional: times to retry (default: 3) | 3 | +| timeout | instance/snmp_host | Optional: timesout in ms (default: 450) | 450 | +| version | instance/snmp_host | Optional: version of SNMP (0:version1, 1:version2c, 3:version3) (default:1) | 1 | +| securityLevel | instance/snmp_host | Optional: Choose 1:NOAUTH_NOPRIV 2:AUTH_NOPRIV 3:AUTH_PRIV (default: 1) | 3 | +| authPassword | instance/snmp_host | Optional: Auth password (version 3) (default: "") | password | +| privacyPassword | instance/snmp_host | Optional: Privacy password (version 3) (default: "") | password | +| appliance.host | instance/mq_appliance | host name for MQ appliance | testbox1.mqappliance.com | +| appliance.user | instance/mq_appliance | user name for MQ appliance | admin | +| appliance.password | instance/mq_appliance | password for MQ appliance | xxxx | + + +## Build & Run (for developers) 1) Make sure Java SDK 11+ is installed. ```bash diff --git a/rdb/README.md b/rdb/README.md index 5a0c756..d52eb40 100644 --- a/rdb/README.md +++ b/rdb/README.md @@ -1,16 +1,3 @@ -# ODCD (OpenTelemetry Data Collector for Telemetry Data) - -**[Semantic Convention](docs/semconv)** | -**[Support](docs/support/README.md)** | -**[Changelog](CHANGELOG.md)** | -**[Contributing](CONTRIBUTING.md)** | -**[License](LICENSE)** - ---- -ODCD (OpenTelemetry Data Collector for Telemetry Data) is a collection of stanalone OpenTelemetry receivers for databases, systems, and apps. All implementations are based on predefined OpenTelemetry Semantic Conventions. A standard OTLP exporter is provided to forward the data from this "Data Collector" to a Telemetry backend or an OpenTelemetry Collector. - -

- # Data Collector for Relational Database @@ -63,7 +50,7 @@ nohup ./bin/otel-dc-rdb ``` -## Build & Run (for develpers) +## Build & Run (for developers) 1) Make sure Java SDK is installed. ```bash From db1d3c8a5829d8c27024f005bae5d519c49afbb8 Mon Sep 17 00:00:00 2001 From: vivek mahalingam Date: Mon, 8 Jul 2024 13:14:07 +0530 Subject: [PATCH 2/8] Check For SQL Trace --- rdb/config/config-informix.yaml | 1 + .../instana/dc/rdb/impl/informix/InformixDc.java | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/rdb/config/config-informix.yaml b/rdb/config/config-informix.yaml index 760c282..f6dd67d 100644 --- a/rdb/config/config-informix.yaml +++ b/rdb/config/config-informix.yaml @@ -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. ### Uncomment the below section in case you are using Vault to retrieve the password. #vault: diff --git a/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java b/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java index 5c2199a..20a3de1 100644 --- a/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java +++ b/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java @@ -46,6 +46,7 @@ import static com.instana.dc.rdb.impl.Constants.CACHE_WRITE_RATIO_SCRIPT; import static com.instana.dc.rdb.impl.Constants.LOCK_WAITS_SCRIPT; import static com.instana.dc.rdb.impl.Constants.LRU_WRITES_SCRIPT; +import static com.instana.dc.rdb.impl.informix.InformixUtil.*; import static com.instana.dc.rdb.impl.informix.InformixUtil.DB_HOST_AND_VERSION_SQL; @@ -65,6 +66,8 @@ public class InformixDc extends AbstractDbDc { private final MetricsCollector metricCollector; + int sqlTraceEnabled; + public InformixDc(Map properties, String dbSystem, String dbDriver) throws SQLException { super(properties, dbSystem, dbDriver); parseCustomAttributes(properties); @@ -128,7 +131,7 @@ private void registerMetricsMetadata() { MetricsDataConfigRegister.subscribeMetricDataConfig(DB_SEQ_SCAN_TABLE_NAME, new MetricDataConfig(sequentialScanTableQuery, MetricCollectionMode.SQL, Number.class)); - //Metrics via onstat command +// Metrics via onstat command MetricsDataConfigRegister.subscribeMetricDataConfig(DB_SQL_COUNT_NAME, new MetricDataConfig(DB_SQL_COUNT_NAME, SQL_COUNT_SCRIPT, MetricCollectionMode.CMD, Number.class)); MetricsDataConfigRegister.subscribeMetricDataConfig(DB_SQL_RATE_NAME, @@ -230,6 +233,7 @@ private void scheduleCustomPollRate(int pollInterval, IntervalType intervalType) @SuppressWarnings("unchecked") private void parseCustomAttributes(Map properties) { Map customInput = (Map) properties.get("custom.input"); + sqlTraceEnabled = (Integer)customInput.getOrDefault("db.sql.trace.enabled", 0); int sequentialScanCount = (Integer)customInput.getOrDefault("db.sequential.scan.count", 0); long elapsedTimeFrame = Long.parseLong((customInput.getOrDefault("db.sql.elapsed.timeframe", DEFAULT_ELAPSED_TIME)).toString()); StringBuilder databaseName = new StringBuilder(Constants.SINGLE_QUOTES + getDbName() + Constants.SINGLE_QUOTES); @@ -240,6 +244,7 @@ private void parseCustomAttributes(Map properties) { tableSpaceUtilizationQuery = String.format(InformixUtil.TABLESPACE_UTILIZATION_SQL, databaseName); tableSpaceMaxQuery = String.format(InformixUtil.TABLESPACE_MAX_SQL, databaseName); sqlElapsedTimeQuery = String.format(InformixUtil.SQL_ELAPSED_TIME_SQL, elapsedTimeFrame, databaseName); + } private void setDbConnUrl() { @@ -289,11 +294,14 @@ private void getallMetrics() { @SuppressWarnings("unchecked") private void mediumPollingInterval() { - getRawMetric(DB_SQL_COUNT_NAME).setValue((Number) metricCollector.collectMetrics(DB_SQL_COUNT_NAME)); + if(sqlTraceEnabled==1) { + getRawMetric(DB_SQL_COUNT_NAME).setValue((Number) metricCollector.collectMetrics(DB_SQL_COUNT_NAME)); + getRawMetric(DB_SQL_ELAPSED_TIME_NAME).setValue((List) metricCollector.collectMetrics(DB_SQL_ELAPSED_TIME_NAME)); + } getRawMetric(DB_SQL_RATE_NAME).setValue((Number) metricCollector.collectMetrics(DB_SQL_RATE_NAME)); getRawMetric(DB_TRANSACTION_COUNT_NAME).setValue((Number) metricCollector.collectMetrics(DB_TRANSACTION_COUNT_NAME)); getRawMetric(DB_TRANSACTION_RATE_NAME).setValue((Number) metricCollector.collectMetrics(DB_TRANSACTION_COUNT_NAME)); - getRawMetric(DB_SQL_ELAPSED_TIME_NAME).setValue((List) metricCollector.collectMetrics(DB_SQL_ELAPSED_TIME_NAME)); + } private void shortPollingInterval() { From 48bdfdaa0f6c9ba32c85985b6f9ec5c2209793a1 Mon Sep 17 00:00:00 2001 From: vivek mahalingam Date: Mon, 8 Jul 2024 13:16:34 +0530 Subject: [PATCH 3/8] Check For SQL Trace --- .../main/java/com/instana/dc/rdb/impl/informix/InformixDc.java | 1 - 1 file changed, 1 deletion(-) diff --git a/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java b/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java index 20a3de1..58de32f 100644 --- a/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java +++ b/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java @@ -46,7 +46,6 @@ import static com.instana.dc.rdb.impl.Constants.CACHE_WRITE_RATIO_SCRIPT; import static com.instana.dc.rdb.impl.Constants.LOCK_WAITS_SCRIPT; import static com.instana.dc.rdb.impl.Constants.LRU_WRITES_SCRIPT; -import static com.instana.dc.rdb.impl.informix.InformixUtil.*; import static com.instana.dc.rdb.impl.informix.InformixUtil.DB_HOST_AND_VERSION_SQL; From b55da32746414e3fa6739fc5bb420c64454d9368 Mon Sep 17 00:00:00 2001 From: vivek mahalingam Date: Tue, 9 Jul 2024 11:19:10 +0530 Subject: [PATCH 4/8] Sql Trace enabled check --- rdb/src/main/java/com/instana/dc/rdb/impl/Constants.java | 2 +- .../com/instana/dc/rdb/impl/informix/InformixDc.java | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/rdb/src/main/java/com/instana/dc/rdb/impl/Constants.java b/rdb/src/main/java/com/instana/dc/rdb/impl/Constants.java index 061909b..d5b9446 100644 --- a/rdb/src/main/java/com/instana/dc/rdb/impl/Constants.java +++ b/rdb/src/main/java/com/instana/dc/rdb/impl/Constants.java @@ -31,7 +31,7 @@ public class Constants { public static final String CACHE_WRITE_RATIO_SCRIPT = "cache_write_ratio.sh"; public static final String LOCK_WAITS_SCRIPT = "lock_waits.sh"; public static final String LRU_WRITES_SCRIPT = "lru_writes.sh"; - + public static final String DB_SQL_TRACE_ENABLED = "db.sql.trace.enabled"; private Constants() { //Private constructor } diff --git a/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java b/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java index 58de32f..eebb115 100644 --- a/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java +++ b/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java @@ -46,6 +46,7 @@ import static com.instana.dc.rdb.impl.Constants.CACHE_WRITE_RATIO_SCRIPT; import static com.instana.dc.rdb.impl.Constants.LOCK_WAITS_SCRIPT; import static com.instana.dc.rdb.impl.Constants.LRU_WRITES_SCRIPT; +import static com.instana.dc.rdb.impl.Constants.DB_SQL_TRACE_ENABLED; import static com.instana.dc.rdb.impl.informix.InformixUtil.DB_HOST_AND_VERSION_SQL; @@ -65,7 +66,7 @@ public class InformixDc extends AbstractDbDc { private final MetricsCollector metricCollector; - int sqlTraceEnabled; + public boolean sqlTraceEnabled; public InformixDc(Map properties, String dbSystem, String dbDriver) throws SQLException { super(properties, dbSystem, dbDriver); @@ -130,7 +131,7 @@ private void registerMetricsMetadata() { MetricsDataConfigRegister.subscribeMetricDataConfig(DB_SEQ_SCAN_TABLE_NAME, new MetricDataConfig(sequentialScanTableQuery, MetricCollectionMode.SQL, Number.class)); -// Metrics via onstat command + // Metrics via onstat command MetricsDataConfigRegister.subscribeMetricDataConfig(DB_SQL_COUNT_NAME, new MetricDataConfig(DB_SQL_COUNT_NAME, SQL_COUNT_SCRIPT, MetricCollectionMode.CMD, Number.class)); MetricsDataConfigRegister.subscribeMetricDataConfig(DB_SQL_RATE_NAME, @@ -232,7 +233,7 @@ private void scheduleCustomPollRate(int pollInterval, IntervalType intervalType) @SuppressWarnings("unchecked") private void parseCustomAttributes(Map properties) { Map customInput = (Map) properties.get("custom.input"); - sqlTraceEnabled = (Integer)customInput.getOrDefault("db.sql.trace.enabled", 0); + sqlTraceEnabled = (Boolean)customInput.getOrDefault(DB_SQL_TRACE_ENABLED, false); int sequentialScanCount = (Integer)customInput.getOrDefault("db.sequential.scan.count", 0); long elapsedTimeFrame = Long.parseLong((customInput.getOrDefault("db.sql.elapsed.timeframe", DEFAULT_ELAPSED_TIME)).toString()); StringBuilder databaseName = new StringBuilder(Constants.SINGLE_QUOTES + getDbName() + Constants.SINGLE_QUOTES); @@ -293,7 +294,7 @@ private void getallMetrics() { @SuppressWarnings("unchecked") private void mediumPollingInterval() { - if(sqlTraceEnabled==1) { + if(sqlTraceEnabled==true) { getRawMetric(DB_SQL_COUNT_NAME).setValue((Number) metricCollector.collectMetrics(DB_SQL_COUNT_NAME)); getRawMetric(DB_SQL_ELAPSED_TIME_NAME).setValue((List) metricCollector.collectMetrics(DB_SQL_ELAPSED_TIME_NAME)); } From 09300ba6cade80a10e42155ce3b50524dbd1bfa8 Mon Sep 17 00:00:00 2001 From: vivek mahalingam Date: Tue, 9 Jul 2024 11:37:32 +0530 Subject: [PATCH 5/8] Sql Trace enabled check --- rdb/config/config-informix.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rdb/config/config-informix.yaml b/rdb/config/config-informix.yaml index f6dd67d..5cb6d65 100644 --- a/rdb/config/config-informix.yaml +++ b/rdb/config/config-informix.yaml @@ -33,8 +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. - + db.sql.trace.enabled: false #Default is false. Make it true only if `SqlTrace` is enabled for the DB. ### Uncomment the below section in case you are using Vault to retrieve the password. #vault: # connection_url: #Vault Address URL From f63cf13cd9b6e4ad1a1ae75c75d0ef9dd5810f3f Mon Sep 17 00:00:00 2001 From: vivek mahalingam Date: Tue, 9 Jul 2024 11:40:01 +0530 Subject: [PATCH 6/8] Sql Trace enabled check --- .../java/com/instana/dc/rdb/impl/informix/InformixDc.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java b/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java index eebb115..a7bd56c 100644 --- a/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java +++ b/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java @@ -131,7 +131,7 @@ private void registerMetricsMetadata() { MetricsDataConfigRegister.subscribeMetricDataConfig(DB_SEQ_SCAN_TABLE_NAME, new MetricDataConfig(sequentialScanTableQuery, MetricCollectionMode.SQL, Number.class)); - // Metrics via onstat command + //Metrics via onstat command MetricsDataConfigRegister.subscribeMetricDataConfig(DB_SQL_COUNT_NAME, new MetricDataConfig(DB_SQL_COUNT_NAME, SQL_COUNT_SCRIPT, MetricCollectionMode.CMD, Number.class)); MetricsDataConfigRegister.subscribeMetricDataConfig(DB_SQL_RATE_NAME, @@ -244,7 +244,6 @@ private void parseCustomAttributes(Map properties) { tableSpaceUtilizationQuery = String.format(InformixUtil.TABLESPACE_UTILIZATION_SQL, databaseName); tableSpaceMaxQuery = String.format(InformixUtil.TABLESPACE_MAX_SQL, databaseName); sqlElapsedTimeQuery = String.format(InformixUtil.SQL_ELAPSED_TIME_SQL, elapsedTimeFrame, databaseName); - } private void setDbConnUrl() { @@ -301,7 +300,6 @@ private void mediumPollingInterval() { getRawMetric(DB_SQL_RATE_NAME).setValue((Number) metricCollector.collectMetrics(DB_SQL_RATE_NAME)); getRawMetric(DB_TRANSACTION_COUNT_NAME).setValue((Number) metricCollector.collectMetrics(DB_TRANSACTION_COUNT_NAME)); getRawMetric(DB_TRANSACTION_RATE_NAME).setValue((Number) metricCollector.collectMetrics(DB_TRANSACTION_COUNT_NAME)); - } private void shortPollingInterval() { From d217bdd179ae492da9d683319b08fb242f3daaf0 Mon Sep 17 00:00:00 2001 From: vivek mahalingam Date: Wed, 10 Jul 2024 15:17:21 +0530 Subject: [PATCH 7/8] Sql Trace check --- .../java/com/instana/dc/rdb/impl/informix/InformixDc.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java b/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java index a7bd56c..1d4bf97 100644 --- a/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java +++ b/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java @@ -66,7 +66,7 @@ public class InformixDc extends AbstractDbDc { private final MetricsCollector metricCollector; - public boolean sqlTraceEnabled; + public Boolean sqlTraceEnabled; public InformixDc(Map properties, String dbSystem, String dbDriver) throws SQLException { super(properties, dbSystem, dbDriver); @@ -293,7 +293,7 @@ private void getallMetrics() { @SuppressWarnings("unchecked") private void mediumPollingInterval() { - if(sqlTraceEnabled==true) { + if(sqlTraceEnabled) { getRawMetric(DB_SQL_COUNT_NAME).setValue((Number) metricCollector.collectMetrics(DB_SQL_COUNT_NAME)); getRawMetric(DB_SQL_ELAPSED_TIME_NAME).setValue((List) metricCollector.collectMetrics(DB_SQL_ELAPSED_TIME_NAME)); } From 171638b414fbf52ee33058666e1002a299e713b7 Mon Sep 17 00:00:00 2001 From: vivek mahalingam Date: Wed, 10 Jul 2024 15:22:31 +0530 Subject: [PATCH 8/8] Sql Trace check --- .../main/java/com/instana/dc/rdb/impl/informix/InformixDc.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java b/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java index 1d4bf97..176d763 100644 --- a/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java +++ b/rdb/src/main/java/com/instana/dc/rdb/impl/informix/InformixDc.java @@ -66,7 +66,7 @@ public class InformixDc extends AbstractDbDc { private final MetricsCollector metricCollector; - public Boolean sqlTraceEnabled; + private Boolean sqlTraceEnabled; public InformixDc(Map properties, String dbSystem, String dbDriver) throws SQLException { super(properties, dbSystem, dbDriver);