Skip to content

Commit 3cf65b6

Browse files
author
Samiur Arif
authored
[receiver/mongodb] Ensure support of the latest mongodb versions (#33644)
**Description:** Validated new versions of mongodb ( 6.0, 7.0) **Link to tracking Issue:** #32716 **Testing:** Manually newer versions and added/updated integration tests.
1 parent 8e75855 commit 3cf65b6

File tree

5 files changed

+43
-0
lines changed

5 files changed

+43
-0
lines changed

.chloggen/branch-issue-32716.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: 'enhancement'
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: 'receiver/mongodb'
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: 'Ensure support of 6.0 and 7.0 MongoDB versions with integration tests'
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [32716]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: ['user']

receiver/mongodbreceiver/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ This receiver supports MongoDB versions:
2626

2727
- 4.0+
2828
- 5.0
29+
- 6.0
30+
- 7.0
2931

3032
Mongodb recommends to set up a least privilege user (LPU) with a [`clusterMonitor` role](https://www.mongodb.com/docs/v5.0/reference/built-in-roles/#mongodb-authrole-clusterMonitor) in order to collect metrics. Please refer to [lpu.sh](./testdata/integration/scripts/lpu.sh) for an example of how to configure these permissions.
3133

receiver/mongodbreceiver/integration_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ const mongoPort = "27017"
2525
func TestIntegration(t *testing.T) {
2626
t.Run("4.0", integrationTest("4_0", []string{"/setup.sh"}, func(*Config) {}))
2727
t.Run("5.0", integrationTest("5_0", []string{"/setup.sh"}, func(*Config) {}))
28+
t.Run("6.0", integrationTest("5_0", []string{"/setup.sh"}, func(*Config) {}))
29+
t.Run("7.0", integrationTest("5_0", []string{"/setup.sh"}, func(*Config) {}))
2830
t.Run("4.4lpu", integrationTest("4_4lpu", []string{"/lpu.sh"}, func(cfg *Config) {
2931
cfg.Username = "otelu"
3032
cfg.Password = "otelp"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM mongo:6.0
2+
3+
COPY scripts/setup.sh /setup.sh
4+
RUN chmod +x /setup.sh
5+
6+
EXPOSE 27017
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM mongo:7.0
2+
3+
COPY scripts/setup.sh /setup.sh
4+
RUN chmod +x /setup.sh
5+
6+
EXPOSE 27017

0 commit comments

Comments
 (0)