Skip to content

Commit 3f08a60

Browse files
authored
1.5.5 (#198)
* change default connection pool * update net * upgrade prom client * update oci sdk * update load gen util deps --------- Signed-off-by: Mark Nelson <mark.x.nelson@oracle.com>
1 parent 67494a2 commit 3f08a60

File tree

11 files changed

+82
-54
lines changed

11 files changed

+82
-54
lines changed

‎Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ ARG GOARCH
88
ENV GOARCH=${GOARCH:-amd64}
99

1010
RUN microdnf install wget gzip gcc && \
11-
wget -q https://go.dev/dl/go1.22.7.${GOOS}-${GOARCH}.tar.gz && \
11+
wget -q https://go.dev/dl/go1.23.7.${GOOS}-${GOARCH}.tar.gz && \
1212
rm -rf /usr/local/go && \
13-
tar -C /usr/local -xzf go1.22.7.${GOOS}-${GOARCH}.tar.gz && \
14-
rm go1.22.7.${GOOS}-${GOARCH}.tar.gz
13+
tar -C /usr/local -xzf go1.23.7.${GOOS}-${GOARCH}.tar.gz && \
14+
rm go1.23.7.${GOOS}-${GOARCH}.tar.gz
1515

1616
ENV PATH=$PATH:/usr/local/go/bin
1717

‎Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ OS_TYPE ?= $(shell uname -s | tr '[:upper:]' '[:lower:]')
33
ARCH_TYPE ?= $(subst x86_64,amd64,$(patsubst i%86,386,$(ARCH)))
44
GOOS ?= $(shell go env GOOS)
55
GOARCH ?= $(shell go env GOARCH)
6-
VERSION ?= 1.5.4
6+
VERSION ?= 1.5.5
77
LDFLAGS := -X main.Version=$(VERSION)
88
GOFLAGS := -ldflags "$(LDFLAGS) -s -w"
99
BUILD_ARGS = --build-arg VERSION=$(VERSION)

‎README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Contributions are welcome - please see [contributing](CONTRIBUTING.md).
2929

3030
| Release | Date | Changelog |
3131
|---------|----------------------|-----------------------------------------------------------------|
32+
| 1.5.5 | March 13th, 2025 | [1.5.5 Changelog](./changelog.md#version-155-march-13-2025) |
3233
| 1.5.4 | March 3rd, 2025 | [1.5.4 Changelog](./changelog.md#version-154-march-3-2025) |
3334
| 1.5.3 | January 28th, 2025 | [1.5.3 Changelog](./changelog.md#version-153-january-28-2025) |
3435
| 1.5.2 | December 2nd, 2024 | [1.5.2 Changelog](./changelog.md#version-152-december-2-2024) |
@@ -373,7 +374,7 @@ docker run -it --rm \
373374
-e DB_PASSWORD=Welcome12345 \
374375
-e DB_CONNECT_STRING=free23ai:1521/freepdb \
375376
-p 9161:9161 \
376-
container-registry.oracle.com/database/observability-exporter:1.5.4
377+
container-registry.oracle.com/database/observability-exporter:1.5.5
377378
```
378379

379380
##### Using a wallet
@@ -419,7 +420,7 @@ docker run -it --rm \
419420
-e DB_CONNECT_STRING=devdb_tp \
420421
-v ./wallet:/wallet \
421422
-p 9161:9161 \
422-
container-registry.oracle.com/database/observability-exporter:1.5.4
423+
container-registry.oracle.com/database/observability-exporter:1.5.5
423424
```
424425
> **Note:** If you are using `podman` you must specify the `:z` suffix on the volume mount so that the container will be able to access the files in the volume. For example: `-v ./wallet:/wallet:z`
425426

@@ -714,7 +715,7 @@ An exmaple of [custom metrics for Transacational Event Queues](./custom-metrics-
714715
If you run the exporter as a container image and want to include your custom metrics in the image itself, you can use the following example `Dockerfile` to create a new image:
715716
716717
```Dockerfile
717-
FROM container-registry.oracle.com/database/observability-exporter:1.5.4
718+
FROM container-registry.oracle.com/database/observability-exporter:1.5.5
718719
COPY custom-metrics.toml /
719720
ENTRYPOINT ["/oracledb_exporter", "--custom.metrics", "/custom-metrics.toml"]
720721
```

‎changelog.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44

55
Our current priorities are support for RAC and mutliple databases (including #84 and #89). We expect to address these in an upcoming release.
66

7-
The following changes are in main but not yet available in a release:
7+
8+
### Version 1.5.5, March 13, 2025
9+
10+
This release includes the following changes:
811

912
- [@VictorErmakov](https://github.com/VictorErmakov) updated the docker-compose sample with connection pool parameters to avoid fast connect cycling (#191).
13+
- Update default values for connection pool parameters to use go-sql pooling by default to avoid fast connet cycling.
14+
- Updated some third-party dependencies.
1015

1116
Thank you to the following people for their suggestions and contributions:
1217

‎docker-compose/compose.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ services:
4343
start_period: 30s
4444

4545
exporter:
46-
image: container-registry.oracle.com/database/observability-exporter:1.5.4
46+
image: container-registry.oracle.com/database/observability-exporter:1.5.5
4747
container_name: exporter
48-
command:
49-
- '--database.maxIdleConns=10'
50-
- '--database.maxOpenConns=10'
48+
# command:
49+
# - '--log.level=debug'
50+
# - '--database.maxIdleConns=10'
51+
# - '--database.maxOpenConns=10'
5152
ports:
5253
- 9161:9161
5354
environment:

‎docker-compose/txeventq-load/pom.xml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!-- Copyright (c) 2024, Oracle and/or its affiliates. -->
3-
<!-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -->
4-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
<!-- Licensed under the Universal Permissive License v 1.0 as shown at
4+
https://oss.oracle.com/licenses/upl. -->
5+
<project xmlns="http://maven.apache.org/POM/4.0.0"
6+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
57
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
68
<modelVersion>4.0.0</modelVersion>
79
<parent>
810
<groupId>org.springframework.boot</groupId>
911
<artifactId>spring-boot-starter-parent</artifactId>
10-
<version>3.3.1</version>
11-
<relativePath/> <!-- lookup parent from repository -->
12+
<version>3.4.3</version>
13+
<relativePath /> <!-- lookup parent from repository -->
1214
</parent>
1315
<groupId>com.example</groupId>
1416
<artifactId>txeventq-load</artifactId>
1517
<version>0.0.1-SNAPSHOT</version>
1618
<name>txeventq-load</name>
1719
<description>Create some load to demo TxEventQ dashboard</description>
18-
<url/>
20+
<url />
1921
<licenses>
20-
<license/>
22+
<license />
2123
</licenses>
2224
<developers>
23-
<developer/>
25+
<developer />
2426
</developers>
2527
<scm>
26-
<connection/>
27-
<developerConnection/>
28-
<tag/>
29-
<url/>
28+
<connection />
29+
<developerConnection />
30+
<tag />
31+
<url />
3032
</scm>
3133
<properties>
3234
<java.version>21</java.version>
@@ -40,13 +42,23 @@
4042
<dependency>
4143
<groupId>com.oracle.database.spring</groupId>
4244
<artifactId>oracle-spring-boot-starter-aqjms</artifactId>
43-
<version>23.4.0</version>
45+
<version>25.1.0</version>
4446
</dependency>
4547

4648
<dependency>
4749
<groupId>com.oracle.database.spring</groupId>
4850
<artifactId>oracle-spring-boot-starter-ucp</artifactId>
49-
<version>23.4.0</version>
51+
<version>25.1.0</version>
52+
</dependency>
53+
54+
<dependency>
55+
<groupId>org.springframework.boot</groupId>
56+
<artifactId>spring-boot-starter-jdbc</artifactId>
57+
</dependency>
58+
59+
<dependency>
60+
<groupId>org.projectlombok</groupId>
61+
<artifactId>lombok</artifactId>
5062
</dependency>
5163

5264
<dependency>
@@ -65,4 +77,4 @@
6577
</plugins>
6678
</build>
6779

68-
</project>
80+
</project>

‎docker-compose/txeventq-load/src/main/resources/application.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ spring:
66
enabled: true
77

88
datasource:
9-
url: jdbc:oracle:thin:@//172.24.0.3:1521/freepdb1
9+
url: jdbc:oracle:thin:@//172.23.0.2:1521/freepdb1
1010
username: system
1111
password: Welcome12345
1212
driver-class-name: oracle.jdbc.OracleDriver

‎go.mod

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
module github.com/oracle/oracle-db-appdev-monitoring
22

3-
go 1.22
3+
go 1.23.0
44

5-
toolchain go1.22.4
5+
toolchain go1.23.7
66

77
require (
88
github.com/BurntSushi/toml v1.4.0
99
github.com/alecthomas/kingpin/v2 v2.4.0
1010
github.com/godror/godror v0.47.0
11-
github.com/oracle/oci-go-sdk/v65 v65.84.0
12-
github.com/prometheus/client_golang v1.21.0
11+
github.com/oracle/oci-go-sdk/v65 v65.86.0
12+
github.com/prometheus/client_golang v1.21.1
1313
github.com/prometheus/common v0.62.0
1414
github.com/prometheus/exporter-toolkit v0.14.0
1515
)
@@ -32,13 +32,13 @@ require (
3232
github.com/prometheus/procfs v0.15.1 // indirect
3333
github.com/sony/gobreaker v0.5.0 // indirect
3434
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
35-
golang.org/x/crypto v0.32.0 // indirect
35+
golang.org/x/crypto v0.35.0 // indirect
3636
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
37-
golang.org/x/net v0.33.0 // indirect
37+
golang.org/x/net v0.36.0 // indirect
3838
golang.org/x/oauth2 v0.24.0 // indirect
39-
golang.org/x/sync v0.10.0 // indirect
40-
golang.org/x/sys v0.29.0 // indirect
41-
golang.org/x/text v0.21.0 // indirect
39+
golang.org/x/sync v0.11.0 // indirect
40+
golang.org/x/sys v0.30.0 // indirect
41+
golang.org/x/text v0.22.0 // indirect
4242
google.golang.org/protobuf v1.36.1 // indirect
4343
gopkg.in/yaml.v2 v2.4.0 // indirect
4444
)

‎go.sum

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KE
2020
github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
2121
github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
2222
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
23-
github.com/godror/godror v0.46.1-0.20250226074503-67aeda640090 h1:9/ZPRz24+4QrrU/xB0I+AAXKzLV2xtG+mn+9zb3cQCg=
24-
github.com/godror/godror v0.46.1-0.20250226074503-67aeda640090/go.mod h1:44hxVDzvFSwc+yGyRM+riCLNAY5SwZkUfLzVTh5MXCg=
2523
github.com/godror/godror v0.47.0 h1:GZsaMOIvLqgTPPVXFIavRI4mqwNIhmcFfEZbzWeabGE=
2624
github.com/godror/godror v0.47.0/go.mod h1:44hxVDzvFSwc+yGyRM+riCLNAY5SwZkUfLzVTh5MXCg=
2725
github.com/godror/knownpb v0.1.2 h1:icMyYsYVpGmzhoVA01xyd0o4EaubR31JPK1UxQWe4kM=
@@ -52,10 +50,14 @@ github.com/oklog/ulid/v2 v2.0.2 h1:r4fFzBm+bv0wNKNh5eXTwU7i85y5x+uwkxCUTNVQqLc=
5250
github.com/oklog/ulid/v2 v2.0.2/go.mod h1:mtBL0Qe/0HAx6/a4Z30qxVIAL1eQDweXq5lxOEiwQ68=
5351
github.com/oracle/oci-go-sdk/v65 v65.84.0 h1:NCEiq42gwrFJPLmIMxz4QnZSM4Wmp6n+sjpznBDg060=
5452
github.com/oracle/oci-go-sdk/v65 v65.84.0/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
53+
github.com/oracle/oci-go-sdk/v65 v65.86.0 h1:vFEguOYWd29j4TEy+BaQsUhMh2TPtfWRfLwQpYaU1wk=
54+
github.com/oracle/oci-go-sdk/v65 v65.86.0/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
5555
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
5656
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
5757
github.com/prometheus/client_golang v1.21.0 h1:DIsaGmiaBkSangBgMtWdNfxbMNdku5IK6iNhrEqWvdA=
5858
github.com/prometheus/client_golang v1.21.0/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg=
59+
github.com/prometheus/client_golang v1.21.1 h1:DOvXXTqVzvkIewV/CDPFdejpMCGeMcbGCQ8YOmu+Ibk=
60+
github.com/prometheus/client_golang v1.21.1/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg=
5961
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
6062
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
6163
github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io=
@@ -81,23 +83,23 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf
8183
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
8284
github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc=
8385
github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU=
84-
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
85-
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
86+
golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs=
87+
golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ=
8688
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8=
8789
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY=
88-
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
89-
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
90+
golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA=
91+
golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I=
9092
golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE=
9193
golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
92-
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
93-
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
94+
golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
95+
golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
9496
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
95-
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
96-
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
97-
golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg=
98-
golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek=
99-
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
100-
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
97+
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
98+
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
99+
golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=
100+
golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s=
101+
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
102+
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
101103
google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk=
102104
google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
103105
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

‎kubernetes/metrics-exporter-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
spec:
1818
containers:
1919
- name: metrics-exporter
20-
image: container-registry.oracle.com/database/observability-exporter:1.5.4
20+
image: container-registry.oracle.com/database/observability-exporter:1.5.5
2121
imagePullPolicy: Always
2222
env:
2323
# uncomment and customize the next item if you want to provide custom metrics definitions

‎main.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ package main
77
import (
88
"context"
99
"fmt"
10-
"github.com/prometheus/common/promslog"
11-
"github.com/prometheus/common/promslog/flag"
1210
"net/http"
1311
"os"
1412
"runtime/debug"
1513
"syscall"
1614
"time"
1715

16+
"github.com/prometheus/common/promslog"
17+
"github.com/prometheus/common/promslog/flag"
18+
1819
"github.com/godror/godror/dsn"
1920
"github.com/prometheus/client_golang/prometheus"
2021
cversion "github.com/prometheus/client_golang/prometheus/collectors/version"
@@ -40,7 +41,7 @@ var (
4041
defaultFileMetrics = kingpin.Flag("default.metrics", "File with default metrics in a TOML file. (env: DEFAULT_METRICS)").Default(getEnv("DEFAULT_METRICS", "default-metrics.toml")).String()
4142
customMetrics = kingpin.Flag("custom.metrics", "Comma separated list of file(s) that contain various custom metrics in a TOML format. (env: CUSTOM_METRICS)").Default(getEnv("CUSTOM_METRICS", "")).String()
4243
queryTimeout = kingpin.Flag("query.timeout", "Query timeout (in seconds). (env: QUERY_TIMEOUT)").Default(getEnv("QUERY_TIMEOUT", "5")).Int()
43-
maxIdleConns = kingpin.Flag("database.maxIdleConns", "Number of maximum idle connections in the connection pool. (env: DATABASE_MAXIDLECONNS)").Default(getEnv("DATABASE_MAXIDLECONNS", "0")).Int()
44+
maxIdleConns = kingpin.Flag("database.maxIdleConns", "Number of maximum idle connections in the connection pool. (env: DATABASE_MAXIDLECONNS)").Default(getEnv("DATABASE_MAXIDLECONNS", "10")).Int()
4445
maxOpenConns = kingpin.Flag("database.maxOpenConns", "Number of maximum open connections in the connection pool. (env: DATABASE_MAXOPENCONNS)").Default(getEnv("DATABASE_MAXOPENCONNS", "10")).Int()
4546
poolIncrement = kingpin.Flag("database.poolIncrement", "Connection increment when the connection pool reaches max capacity. (env: DATABASE_POOLINCREMENT)").Default(getEnv("DATABASE_POOLINCREMENT", "-1")).Int()
4647
poolMaxConnections = kingpin.Flag("database.poolMaxConnections", "Maximum number of connections in the connection pool. (env: DATABASE_POOLMAXCONNECTIONS)").Default(getEnv("DATABASE_POOLMAXCONNECTIONS", "-1")).Int()
@@ -88,6 +89,12 @@ func main() {
8889
logger.Info("RESTART_INTERVAL env var is not present, so will not restart myself periodically")
8990
}
9091

92+
if *maxIdleConns > 0 {
93+
logger.Info("DATABASE_MAXIDLECONNS is greater than 0, so will use go-sql connection pool and DATABASE_POOL* settings will be ignored")
94+
} else {
95+
logger.Info("DATABASE_MAXIDLECONNS is 0, so will use Oracle connection pool. Tune with DATABASE_POOL* settings")
96+
}
97+
9198
config := &collector.Config{
9299
User: user,
93100
Password: password,

0 commit comments

Comments
 (0)