Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
97d8a5b
added first tracing tests
nhachicha Jul 11, 2025
c82a6a2
using unsetOrMatches for txNumber, since it's not set for single topo…
nhachicha Jul 16, 2025
61270d6
updating tests
nhachicha Jul 20, 2025
581faa1
Tests and schema update for the upcoming Otel spec
nhachicha Aug 8, 2025
c447d10
Merge branch 'nh/tracing'
nhachicha Aug 8, 2025
3a578ee
Update generated files
nhachicha Aug 8, 2025
dbb1a9c
update schema to latest (1.26)
nhachicha Aug 8, 2025
29e25a1
update tests
nhachicha Aug 8, 2025
f801d78
DRIVERS-719 OpenTelementry specification
comandeo-mongo Jun 26, 2025
9d66a8a
Cursor operations
comandeo-mongo Aug 1, 2025
269221c
update doc
nhachicha Aug 9, 2025
452696d
moved tests under open-telemtry directroy
nhachicha Aug 9, 2025
9f05c59
Fixing formatting
nhachicha Aug 9, 2025
0523751
update formatting using pre-commit mdformat
nhachicha Aug 9, 2025
8466c1b
Adding Test README
nhachicha Aug 9, 2025
18ad723
Adding retries test, fixing duplicate exception tag
nhachicha Aug 13, 2025
04b947a
Update source/open-telemetry/open-telemetry.md
nhachicha Aug 14, 2025
88c7be0
Update source/open-telemetry/open-telemetry.md
nhachicha Aug 14, 2025
ced82eb
Update source/unified-test-format/tests/invalid/entity-client-observe…
nhachicha Aug 15, 2025
f1804c3
Update source/unified-test-format/tests/invalid/expectedTracingSpans-…
nhachicha Aug 15, 2025
03d4e3c
Update source/unified-test-format/tests/invalid/entity-client-observe…
nhachicha Aug 15, 2025
3c69ed5
Update source/unified-test-format/tests/invalid/expectedTracingSpans-…
nhachicha Aug 15, 2025
240d009
Update source/unified-test-format/tests/invalid/expectedTracingSpans-…
nhachicha Aug 15, 2025
6a4d217
Update source/unified-test-format/tests/invalid/expectedTracingSpans-…
nhachicha Aug 15, 2025
b596f05
Update generated files
nhachicha Aug 15, 2025
bbb075b
Update source/unified-test-format/tests/invalid/expectedTracingSpans-…
nhachicha Aug 15, 2025
a5638da
Update source/unified-test-format/tests/invalid/expectedTracingSpans-…
nhachicha Aug 15, 2025
56570a5
Update source/unified-test-format/tests/invalid/expectedTracingSpans-…
nhachicha Aug 15, 2025
a4aa513
Update source/unified-test-format/tests/invalid/expectedTracingSpans-…
nhachicha Aug 15, 2025
cb74b54
Using YAML anchors and references
nhachicha Aug 14, 2025
3caa87f
PR feedback: Updating schema, adding more invalid tests
nhachicha Aug 15, 2025
7a68cbc
Fixing lint errors
nhachicha Aug 15, 2025
1c24759
Update source/open-telemetry/open-telemetry.md
comandeo-mongo Aug 18, 2025
a989a49
Update source/open-telemetry/open-telemetry.md
comandeo-mongo Aug 18, 2025
c84847c
adding more tests for operations
nhachicha Aug 20, 2025
a808992
update list of supported operations
nhachicha Aug 20, 2025
f78b541
Adjust spec format
comandeo-mongo Sep 2, 2025
67d4c90
Clarify cursor operation and transactions nesting
comandeo-mongo Sep 3, 2025
b478c9e
Fix bulkWrite test
comandeo-mongo Sep 3, 2025
0a1134d
Updating tests:
nhachicha Sep 8, 2025
7d0d83d
Merge remote-tracking branch 'origin/master' into DRIVERS-719
nhachicha Sep 9, 2025
0edc807
Fixing typo in test file
nhachicha Sep 9, 2025
3822daf
Fixing test
nhachicha Sep 9, 2025
9987dbf
Added convenient transaction test
nhachicha Sep 9, 2025
51fc929
Bring spec in accordance with the new tests
comandeo-mongo Sep 9, 2025
2841df3
db.response.status_code type is string per the OTel convention https:…
nhachicha Sep 9, 2025
5af87ec
Fix review remarks
comandeo-mongo Sep 9, 2025
46bc709
Fix review remarks
comandeo-mongo Sep 9, 2025
ae0d15e
Fix section names
comandeo-mongo Sep 10, 2025
52974c0
- Clarifying rules for db.namespace, db.collection.name and db.query.…
nhachicha Sep 10, 2025
00c1dc3
Update source/open-telemetry/open-telemetry.md
comandeo-mongo Sep 16, 2025
cafe19c
Respond to code review remarks
comandeo-mongo Sep 16, 2025
99f7ed3
Update source/open-telemetry/tests/operation/atlas_search.yml
comandeo-mongo Sep 16, 2025
50966dd
Tests formating
nhachicha Sep 17, 2025
1ca2881
Merge remote-tracking branch 'origin/master' into DRIVERS-719
nhachicha Sep 17, 2025
39863b0
Fix linting
nhachicha Sep 17, 2025
92bea10
Adding prose tests description
nhachicha Sep 18, 2025
e2d5ead
Folding find_reties test under find
nhachicha Sep 18, 2025
80ae25f
Clarify configuration options
comandeo-mongo Sep 18, 2025
682d6b8
Address code review remarks
comandeo-mongo Sep 18, 2025
5fa16fa
Add tests for client configuration
comandeo-mongo Sep 18, 2025
0895547
Remove non compliats tests
comandeo-mongo Sep 18, 2025
d8ecaf0
Fix typos
comandeo-mongo Sep 18, 2025
c9f1e94
Address code review remarks
comandeo-mongo Sep 19, 2025
b6e0eb9
Clarify query parametrization
comandeo-mongo Sep 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 133 additions & 55 deletions source/open-telemetry/open-telemetry.md

Large diffs are not rendered by default.

30 changes: 28 additions & 2 deletions source/open-telemetry/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ createEntities:
enableCommandPayload: true
```

These tests require the ability to collect tracing [spans](../open-telemetry.md#span) data in a structured form as
described in the
These tests require the ability to collect tracing [spans](../open-telemetry.md) data in a structured form as described
in the
[Unified Test Format specification.expectTracingMessages](../../unified-test-format/unified-test-format.md#expectTracingMessages).
For example the Java driver uses [Micrometer](https://jira.mongodb.org/browse/JAVA-5732) to collect tracing spans.

Expand All @@ -32,3 +32,29 @@ expectTracingMessages:
spans:
...
```

### Prose Tests

*Test 1: Tracing Enable/Disable via Environment Variable*

1. Set the environment variable `OTEL_#{LANG}_INSTRUMENTATION_MONGODB_ENABLED` to `false`.
2. Create a `MongoClient` without explicitly enabling tracing.
3. Perform a database operation (e.g., `find()` on a test collection).
4. Assert that no OpenTelemetry tracing spans are emitted for the operation.
5. Set the environment variable `OTEL_#{LANG}_INSTRUMENTATION_MONGODB_ENABLED` to `true`.
6. Create a new `MongoClient` without explicitly enabling tracing.
7. Perform the same database operation.
8. Assert that OpenTelemetry tracing spans are emitted for the operation.

*Test 2: Command Payload Emission via Environment Variable*

1. Set the environment variable `OTEL_#{LANG}_INSTRUMENTATION_MONGODB_ENABLED` to `true`.
2. Set the environment variable `OTEL_#{LANG}_INSTRUMENTATION_MONGODB_QUERY_TEXT_MAX_LENGTH` to a positive integer
(e.g., 1024).
3. Create a `MongoClient` without explicitly enabling command payload emission.
4. Perform a database operation (e.g., `find()`).
5. Assert that the emitted tracing span includes the `db.query.text` attribute.
6. Unset the environment variable `OTEL_#{LANG}_INSTRUMENTATION_MONGODB_QUERY_TEXT_MAX_LENGTH`.
7. Create a new `MongoClient`.
8. Perform the same database operation.
9. Assert that the emitted tracing span does not include the `db.query.text` attribute.
293 changes: 0 additions & 293 deletions source/open-telemetry/tests/cursor/cursor.json

This file was deleted.

Loading
Loading