Skip to content

Commit 6faf85f

Browse files
authored
[discovery] Fix crashing collector if discovered mongodb isn't reachable (#4911)
Reduce the connection timeout to 5 seconds. Otherwise, it's 60s for every mongodb query, which accumulates to a significant delay and makes the collector being killed in k8s.
1 parent 6ed7e4f commit 6faf85f

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### 🧰 Bug fixes 🧰
6+
7+
- (Splunk) `discovery`: Fix crashing collector if discovered mongodb isn't reachable in Kubernetes ([#4911](https://github.com/signalfx/splunk-otel-collector/pull/4911)))
8+
59
## v0.101.0
610

711
### 🛑 Breaking changes 🛑

cmd/otelcol/config/collector/config.d.linux/receivers/mongodb.discovery.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
# hosts:
2323
# - endpoint: '`endpoint`'
2424
# transport: tcp
25+
# timeout: 5s
2526
# status:
2627
# metrics:
2728
# - status: successful

internal/confmapprovider/discovery/bundle/bundle.d/receivers/mongodb.discovery.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ mongodb:
1818
hosts:
1919
- endpoint: '`endpoint`'
2020
transport: tcp
21+
timeout: 5s
2122
status:
2223
metrics:
2324
- status: successful

internal/confmapprovider/discovery/bundle/bundle.d/receivers/mongodb.discovery.yaml.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
hosts:
1515
- endpoint: '`endpoint`'
1616
transport: tcp
17+
timeout: 5s
1718
status:
1819
metrics:
1920
- status: successful

0 commit comments

Comments
 (0)