Skip to content

Commit 712b15b

Browse files
Merge pull request #7423 from OpenLiberty/staging
Staging to vNExt 24.0.0.7 issues
2 parents d5ebb60 + 1c049d7 commit 712b15b

File tree

9 files changed

+69
-49
lines changed

9 files changed

+69
-49
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
.DS_STORE
2+
.vscode/*
3+
.vscode/**/*
24
antora-playbook.yml

modules/ROOT/pages/jdbc-tracing.adoc

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022, 2023 IBM Corporation and others.
1+
// Copyright (c) 2022, 2024 IBM Corporation and others.
22
// Licensed under Creative Commons Attribution-NoDerivatives
33
// 4.0 International (CC BY-ND 4.0)
44
// https://creativecommons.org/licenses/by-nd/4.0/
@@ -22,7 +22,7 @@ You can enable tracing for your third-party JDBC driver in Open Liberty for debu
2222

2323
== Understanding Open Liberty tracing
2424

25-
How you enable trace for your JDBC driver depends on whether the driver supports the `java.util.logging` Java logging library or some other logging library, such as SLF4J or Log4J. In either case, you must identify your driver in the trace specification. Drivers that support the `java.util.logging` library are specified by the package name that the driver uses.
25+
How you enable trace for your JDBC driver depends on whether the driver supports the `java.util.logging` Java logging library or some other logging library, such as SLF4J or Log4J. In any case, you must configure the trace specification for your driver. Drivers that support the `java.util.logging` library are specified by the package name that the driver uses.
2626

2727
Drivers that do not support the `java.util.logging` library are specified by the log writer name for the JDBC driver. Open Liberty provides log writers for common database vendors that generate logs based on JDBC specification methods such as `getConnection` and `executeQuery`. Open Liberty also provides a generic log writer for drivers that do not support the `java.util.logging` library and for which no driver-specific log writer exists.
2828

@@ -66,11 +66,11 @@ Drivers that support the `java.util.logging` library can also be configured in t
6666
[#customsettings]
6767
== Configure custom settings
6868

69-
If your JDBC driver has custom trace settings, you can set these custom trace settings as JDBC driver vendor properties in the `server.xml` file.
69+
If your JDBC driver has custom trace settings, you can configure these custom trace settings as JDBC driver vendor properties in the `server.xml` file.
7070

7171
[source, xml]
7272
----
73-
<logging traceSpecification="*=info:RRA=all:com.ibm.db2=all" ... />
73+
<logging traceSpecification="*=info:RRA=all:com.ibm.ws.db2.logwriter=all" ... />
7474
<datasource ...>
7575
<!-- traceLevel -1 is equivalent to ALL -->
7676
<properties.db2.jcc traceLevel="-1"/>
@@ -100,11 +100,11 @@ The following subsections contain JDBC driver specific configuration.
100100
[#DB2JCC]
101101
=== DB2 JCC
102102

103-
The DB2 JCC driver supports the `java.util.logging` library. The driver uses the `com.ibm.db2` package name in the trace specification. The following `server.xml` file example shows you the configuration to enable trace for the DB2 JCC driver and specify a custom property.
103+
The DB2 JCC does not support the `java.util.logging` library. This driver has its own logging implementations that output directly to a file by using a PrintWriter. Open Liberty provides the `com.ibm.ws.db2.logwriter` log writer name for trace specification that configures a PrintWriter to output JCC driver trace to the ` trace.log` file. The following `server.xml` file example shows you the configuration to enable trace for the DB2 JCC driver and specify a custom property.
104104

105105
[source, xml]
106106
----
107-
<logging traceSpecification="*=info:RRA=all:com.ibm.db2=all" ... />
107+
<logging traceSpecification="*=info:RRA=all:com.ibm.ws.db2.logwriter=all" ... />
108108
<datasource ...>
109109
<!-- traceLevel -1 is equivalent to ALL -->
110110
<properties.db2.jcc traceLevel="-1"/>
@@ -117,7 +117,7 @@ For more information about valid values for the `traceLevel` attribute, see http
117117
[#Derby]
118118
=== Derby
119119

120-
The Derby driver does not support the `java.util.logging` library. Open Liberty provides the `com.ibm.ws.derby.logwriter` log writer name in the trace specification. The following `server.xml` file example shows you the configuration to enable trace for the Derby driver.
120+
The Derby driver does not support the `java.util.logging` library. Open Liberty provides the `com.ibm.ws.derby.logwriter` log writer name for trace specification. The following `server.xml` file example shows you the configuration to enable trace for the Derby driver.
121121

122122
[source, xml]
123123
----
@@ -128,7 +128,7 @@ The Derby driver does not support the `java.util.logging` library. Open Liberty
128128
[#InformixJDBC]
129129
=== Informix using JDBC
130130

131-
The Informix using JDBC driver supports the `java.util.logging` library. The driver uses the `com.informix` package name in the trace specification. The following `server.xml` file example shows you the configuration to enable trace for the Informix using JDBC driver.
131+
The Informix using JDBC driver supports the `java.util.logging` library. The driver uses the `com.informix` package name for trace specification. The following `server.xml` file example shows you the configuration to enable trace for the Informix using JDBC driver.
132132

133133
[source, xml]
134134
----
@@ -139,11 +139,11 @@ The Informix using JDBC driver supports the `java.util.logging` library. The dri
139139
[#InformixDB2JCC]
140140
=== Informix using DB2 JCC
141141

142-
The Informix using DB2 JCC driver supports the `java.util.logging` library. The driver uses the `com.ibm.db2` package name in the trace specification. The following `server.xml` file example shows you the configuration to enable trace for the Informix using DB2 JCC driver and specify a custom property.
142+
Informix using the DB2 JCC driver does not support the `java.util.logging` library. This driver has its own logging implementations that output directly to a file by using a PrintWriter. Open Liberty provides the `com.ibm.ws.db2.logwriter` log writer name for trace specification that configures a PrintWriter to output JCC driver trace to the `trace.log` file. The following `server.xml` file example shows you the configuration to enable trace for Informix by using the DB2 JCC driver and specify a custom property.
143143

144144
[source, xml]
145145
----
146-
<logging traceSpecification="*=info:RRA=all:com.ibm.db2=all" />
146+
<logging traceSpecification="*=info:RRA=all:com.ibm.ws.db2.logwriter=all" />
147147
148148
<datasource ... >
149149
<!-- traceLevel -1 is equivalent to ALL -->
@@ -157,7 +157,7 @@ For more information on additional valid values for the traceLevel, see https://
157157
[#SQLServerJDBCdriver]
158158
=== Microsoft SQL Server JDBC driver
159159

160-
The Microsoft SQL Server JDBC driver supports the `java.util.logging` library. The driver uses the `com.microsoft.sqlserver.jdbc` package name in the trace specification. The following `server.xml` file example shows you the configuration to enable trace for the Microsoft SQL Server JDBC driver.
160+
The Microsoft SQL Server JDBC driver supports the `java.util.logging` library. The driver uses the `com.microsoft.sqlserver.jdbc` package name for trace specification. The following `server.xml` file example shows you the configuration to enable trace for the Microsoft SQL Server JDBC driver.
161161

162162
[source, xml]
163163
----
@@ -168,7 +168,7 @@ The Microsoft SQL Server JDBC driver supports the `java.util.logging` library. T
168168
[#SQLServerDataDirectdriver]
169169
=== Microsoft SQL Server DataDirect driver
170170

171-
The Microsoft SQL Server DataDirect driver does not support the `java.util.logging` library. Open Liberty provides the `com.ibm.ws.sqlserver.logwriter` log writer name in the trace specification. The following `server.xml` file example shows you the configuration to enable trace for the Microsoft SQL Server DataDirect driver.
171+
The Microsoft SQL Server DataDirect driver does not support the `java.util.logging` library. Open Liberty provides the `com.ibm.ws.sqlserver.logwriter` log writer name for trace specification. The following `server.xml` file example shows you the configuration to enable trace for the Microsoft SQL Server DataDirect driver.
172172

173173
[source, xml]
174174
----
@@ -179,16 +179,18 @@ The Microsoft SQL Server DataDirect driver does not support the `java.util.loggi
179179
[#Oracle]
180180
=== Oracle
181181

182-
Oracle provides two different drivers, one for production and another for debugging purposes. The production driver does not produce any trace, so you need to download and replace your production driver with the debugging driver. The debugging driver has `_g` in the driver name. For example, `ojdbc8.jar` is `ojdbc8_g.jar`. Configure the debugging driver by specifying the `library` subelement within the `jdbcDriver` element. The `library` subelement defines the path to the debugging driver JAR file.
182+
Prior to Oracle 23c, Oracle provided two different drivers, one for production and another for debugging purposes. The production driver does not produce any trace, so you need to download and replace your production driver with the debugging driver. The debugging driver has `_g` in the driver name. For example, `ojdbc8.jar` is `ojdbc8_g.jar`. Configure the debugging driver by specifying the `library` subelement within the `jdbcDriver` element. The `library` subelement defines the path to the debugging driver JAR file.
183183

184-
The Oracle driver supports the `java.util.logging` library. The driver uses the `oracle` package name in the trace specification. The following `server.xml` file example shows you how to configure the Oracle debugging driver and enable trace.
184+
In Oracle 23c and later, Oracle no longer provides the `_g` drivers and diagnostic trace is provided in the base JDBC driver.
185+
186+
The Oracle JDBC and Oracle JDBC debug drivers support the `java.util.logging` library. The driver uses the `oracle` package name for trace specification. The following `server.xml` file example shows you how to configure the Oracle debugging driver and enable trace.
185187

186188
[source, xml]
187189
----
188190
<logging traceSpecification="*=info:RRA=all:oracle=all" />
189191
<jdbcDriver id="oracleDriver">
190192
<library id="oracleDebug">
191-
<file name="path_to_oracle_driver/ojdbcX_g.jar"/>
193+
<file name="path_to_oracle_driver/ojdbcX[_g].jar"/>
192194
</library>
193195
</jdbcDriver>
194196
----
@@ -210,7 +212,7 @@ The following `server.xml` file example shows you how to configure the Oracle de
210212
----
211213
<jdbcDriver id="oracleDriver">
212214
<library id="oracleDebug">
213-
<file name="path_to_oracle_driver/ojdbcX_g.jar"/>
215+
<file name="path_to_oracle_driver/ojdbcX[_g].jar"/>
214216
</library>
215217
</jdbcDriver>
216218
----
@@ -247,14 +249,14 @@ For Oracle recommended settings, see the Oracle documentation.
247249
[#PostgreSQL]
248250
=== PostgreSQL
249251

250-
The PostgreSQL driver version 42.0.0 and later supports the `java.util.logging` library. The driver uses the `org.postgresql` package name in the trace specification. The following `server.xml` file example shows the configuration to enable trace for the PostgreSQL driver.
252+
The PostgreSQL driver version 42.0.0 and later supports the `java.util.logging` library. The driver uses the `org.postgresql` package name for trace specification. The following `server.xml` file example shows the configuration to enable trace for the PostgreSQL driver.
251253

252254
[source, xml]
253255
----
254256
<logging traceSpecification="*=info:RRA=all:org.postgresql=all" />
255257
----
256258

257-
Prior to version 42.0.0, the PostgreSQL driver does not support the `java.util.logging` library. Open Liberty provides the `com.ibm.ws.postgresql.logwriter` log writer name in the trace specification. The following `server.xml` file example shows the configuration to enable trace for the PostgreSQL driver in versions earlier than 42.0.0.
259+
Prior to version 42.0.0, the PostgreSQL driver does not support the `java.util.logging` library. Open Liberty provides the `com.ibm.ws.postgresql.logwriter` log writer name for trace specification. The following `server.xml` file example shows the configuration to enable trace for the PostgreSQL driver in versions earlier than 42.0.0.
258260

259261
[source, xml]
260262
----
@@ -265,7 +267,7 @@ Prior to version 42.0.0, the PostgreSQL driver does not support the `java.util.
265267
[#Sybase]
266268
=== Sybase
267269

268-
The Sybase driver does not support the `java.util.logging` library. Open Liberty provides the `com.ibm.ws.sybase.logwriter` log writer name in the trace specification. The following `server.xml` file example shows you the configuration to enable trace for the Sybase driver.
270+
The Sybase driver does not support the `java.util.logging` library. Open Liberty provides the `com.ibm.ws.sybase.logwriter` log writer name for trace specification. The following `server.xml` file example shows you the configuration to enable trace for the Sybase driver.
269271

270272
[source, xml]
271273
----
@@ -276,7 +278,7 @@ The Sybase driver does not support the `java.util.logging` library. Open Liberty
276278
[#Otherdatabases]
277279
=== Other databases
278280

279-
The generic `com.ibm.ws.database.logwriter` log writer name is used in the trace specification for drivers that do not support the `java.util.logging` library and for which Open Liberty does not provide a driver-specific log writer. The following `server.xml` file example shows you how to enable trace with the generic log writer.
281+
The generic `com.ibm.ws.database.logwriter` log writer name is used for drivers that do not support the `java.util.logging` library and for which Open Liberty does not provide a driver-specific log writer. The following `server.xml` file example shows you how to enable trace with the generic log writer.
280282

281283
[source, xml]
282284
----

modules/ROOT/pages/microprofile-config-properties.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ a| Specifies a list of metric names that are paired with custom sets of histogra
272272
* Defining a metric name with no bucket values or invalid values has no effect.
273273
Value precedence is right to left so values that are specified later in the property definition take precedence over previously specified values.
274274

275-
This property is available starting in MicroProfile Metrics 5.1.
275+
This property is available starting in MicroProfile Metrics 3.0.
276276
|Server startup
277277
|`mp.metrics.distribution.histogram.buckets=test.alpha.histogram=10.0,50.0,100.0;test.beta.histogram=30.0,50.0,123`
278278

@@ -285,7 +285,7 @@ a| When the `mp.metrics.distribution.percentiles-histogram.enabled` property is
285285
* Defining a metric name with no value or an invalid value has no effect.
286286
* Value precedence is right to left so values that are defined later in the property definition take precedence over earlier values.
287287

288-
This property is available starting in MicroProfile Metrics 5.1.
288+
This property is available starting in MicroProfile Metrics 3.0.
289289
|Server startup
290290
| `mp.metrics.distribution.histogram.max-value=test.histogram=120`
291291

@@ -298,7 +298,7 @@ a| When the `mp.metrics.distribution.percentiles-histogram.enabled` property is
298298
* Defining a metric name with no value or an invalid value has no effect.
299299
* Value precedence is right to left so values that are specified later in the property definition take precedence over previously specified values.
300300

301-
This property is available starting in MicroProfile Metrics 5.1.
301+
This property is available starting in MicroProfile Metrics 3.0.
302302
|Server startup
303303
| `mp.metrics.distribution.histogram.min-value=test.histogram=50`
304304

@@ -312,7 +312,7 @@ a|Specifies a list of metric names that are paired with custom sets of percentil
312312
* Setting the property without any value disables percentiles for all histogram and timer metrics.
313313
* Value precedence is right to left so values that are specified later in the property definition take precedence over previously specified values.
314314

315-
This property is available starting in MicroProfile Metrics 5.1.
315+
This property is available starting in MicroProfile Metrics 3.0.
316316
|Server startup
317317
|`mp.metrics.distribution.percentiles=test.histogram=0.8,0.86,0.95;test.timer=0.9,0.99;test.*=0.5,0.6;other.*=`
318318

@@ -324,7 +324,7 @@ a| Specifies a list of metric names that are paired with a true or false value.
324324
* Defining a metric name with no values or invalid values has no effect.
325325
* Values defined later take precedence over values before. Precedence is right to left.
326326

327-
This property is available starting in MicroProfile Metrics 5.1.
327+
This property is available starting in MicroProfile Metrics 3.0.
328328
|Server startup
329329
| `mp.metrics.distribution.percentiles-histogram.enabled=test.timer=true;test.histogram=false`
330330

@@ -337,7 +337,7 @@ a| Specifies a list of metric names that are paired with custom sets of histogra
337337
* Defining a metric name with no bucket values or invalid values has no effect.
338338
* Value precedence is right to left so values that are specified later in the property definition take precedence over previously specified values.
339339

340-
This property is available starting in MicroProfile Metrics 5.1.
340+
This property is available starting in MicroProfile Metrics 3.0.
341341
|Server startup
342342
|`mp.metrics.distribution.timer.buckets=test.*=50s,100s;test.alpha.timer=100,500ms,1s`
343343

@@ -350,7 +350,7 @@ a| When the `mp.metrics.distribution.percentiles-histogram.enabled` property is
350350
* Defining a metric name with no value or an invalid value has no effect.
351351
* Value precedence is right to left so values that are specified later in the property definition take precedence over previously specified values.
352352

353-
This property is available starting in MicroProfile Metrics 5.1.
353+
This property is available starting in MicroProfile Metrics 3.0.
354354
|Server startup
355355
| `mp.metrics.distribution.histogram.max-value=test.timer=5s`
356356

@@ -363,7 +363,7 @@ a| When the `mp.metrics.distribution.percentiles-histogram.enabled` property is
363363
* Defining a metric name with no value or an invalid value has no effect.
364364
* Value precedence is right to left so values that are specified later in the property definition take precedence over previously specified values.
365365

366-
This property is available starting in MicroProfile Metrics 5.1.
366+
This property is available starting in MicroProfile Metrics 3.0.
367367
|Server startup
368368
| `mp.metrics.distribution.histogram.min-value=test.timer=200`
369369

0 commit comments

Comments
 (0)