Skip to content

Commit aced1c0

Browse files
Java: Document how to disable spy.log file. (#4754)
Co-authored-by: Isabel <[email protected]>
1 parent a602045 commit aced1c0

File tree

1 file changed

+10
-0
lines changed
  • src/platforms/java/common/performance/instrumentation

1 file changed

+10
-0
lines changed

src/platforms/java/common/performance/instrumentation/jdbc.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ libraryDependencies += "io.sentry" % "sentry-jdbc" % "{{ packages.version('sentr
3636

3737
For other dependency managers, check out the [central Maven repository](https://search.maven.org/artifact/io.sentry/sentry-jdbc).
3838

39+
### Configure
40+
3941
Configure the `DataSource` to use `com.p6spy.engine.spy.P6SpyDriver` as a JDBC driver. For Spring Boot applications:
4042

4143
```properies {tabTitle: application.properties}
@@ -57,3 +59,11 @@ spring.datasource.url: jdbc:p6spy:postgresql://localhost:5432/db
5759
```
5860
5961
P6Spy uses a Java [Service Loader](https://docs.oracle.com/javase/tutorial/sound/SPI-intro.html) mechanism to register `JdbcEventListener`s. For more configuration options, check the [P6Spy Reference Guide](https://p6spy.readthedocs.io/en/latest/).
62+
63+
### Disable Log File Generation
64+
65+
In addition to spans, P6Spy logs JDBC statements to a log file by default. Because this file can grow rapidly, we recommend disabling creating a log file by setting a system property `p6spy.config.modulelist` to `com.p6spy.engine.spy.P6SpyFactory` or creating a `spy.properties` file in `src/main/resources` with the content:
66+
67+
```properties
68+
modulelist=com.p6spy.engine.spy.P6SpyFactory
69+
```

0 commit comments

Comments
 (0)