Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
144008c
Add OpenTelemetry specification tests
adelinowona Dec 9, 2025
abe93b2
Add core OpenTelemetry infrastructure
adelinowona Dec 9, 2025
55f9c94
Integrate tracing configuration into MongoClientSettings
adelinowona Dec 9, 2025
c9b2771
Implement operation-level tracing
adelinowona Dec 9, 2025
96e48f1
Add tracing to collection and database operations
adelinowona Dec 9, 2025
be1bda8
Implement session and transaction tracing
adelinowona Dec 9, 2025
50a4465
Implement command-level tracing
adelinowona Dec 9, 2025
e0b706c
Add test infrastructure for OpenTelemetry
adelinowona Dec 9, 2025
0b03ca4
Fix ClientSessionHandleTests for tests.
adelinowona Dec 10, 2025
8d0ff24
Fix CommandEventHelper tests
adelinowona Dec 10, 2025
f2ffa7d
fix some more CommandEventHelperTests
adelinowona Dec 10, 2025
c5d1834
fix spans not capturing in net472 and netstandard test variants
adelinowona Dec 12, 2025
95877dd
Address review comments
adelinowona Jan 13, 2026
e889fdf
Simplify CommandEventHelper activity tracking.
adelinowona Jan 20, 2026
5ee56f9
refactor operation naming approach
adelinowona Jan 22, 2026
182c092
remove dead code
adelinowona Jan 22, 2026
0b5708d
add smoke tests
adelinowona Jan 22, 2026
9226efe
fix handshake commands being captured
adelinowona Jan 26, 2026
e3dd7f0
skip create_collection tests on server versions < 7.0
adelinowona Jan 28, 2026
2e1ff28
improve otel transaction implementation
adelinowona Feb 2, 2026
b1b5a68
some code cleanup and remove unnecessary comments
adelinowona Feb 3, 2026
4847b32
undo accidental dropping of test databases included in the pushed com…
adelinowona Feb 3, 2026
a0c8ace
cleanup command activity in the right place
adelinowona Feb 3, 2026
b620e7e
reorganize coreTransaction properties and methods
adelinowona Feb 3, 2026
4e6d012
pass tags at activity creation to support sampling
adelinowona Feb 4, 2026
240584b
some cleanup in mongotelemetry class
adelinowona Feb 5, 2026
911e2f9
put attributes in const variables for better grouping
adelinowona Feb 5, 2026
82268ae
refactor commandeventhelper
adelinowona Feb 5, 2026
f653153
address review comments
adelinowona Feb 5, 2026
7f654ee
Pass OperationName to WriteCommandOperation and ReadCommandOperation …
adelinowona Feb 5, 2026
5381f59
address more review comments
adelinowona Feb 6, 2026
bf02864
implement approach for capturing the right exception for server-side …
adelinowona Feb 7, 2026
73d7e15
improve command level exception recording
adelinowona Feb 9, 2026
198bf0e
rename db.system attribute
adelinowona Feb 14, 2026
c86bcb2
fix lsid attribute not showing up on Otel span visualizers
adelinowona Feb 17, 2026
232a54e
remove obsolete method after rebase
adelinowona Feb 19, 2026
99ba4ba
fix bug with default socket timeouts being ignored
adelinowona Feb 23, 2026
6be191f
operation context with metadata improvements
adelinowona Feb 23, 2026
bf1175d
minor fixes
adelinowona Feb 23, 2026
29744fc
invert framework checks for diagnostic source package inclusion
adelinowona Feb 23, 2026
c1a4a7b
ensure command activity completion when we have decryption errors
adelinowona Feb 23, 2026
6a676e7
renaming CompleteCommandWithException to CompleteCommandActivityWithE…
adelinowona Feb 23, 2026
1219c37
remove unused WithOperationMetadata
adelinowona Feb 23, 2026
40789ac
add support for specifying operation name in `CompositeWriteOperation`
adelinowona Feb 23, 2026
59f2e76
use const var for db system attribute
adelinowona Feb 25, 2026
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
127 changes: 127 additions & 0 deletions specifications/open-telemetry/operation/aggregate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
{
"description": "operation aggregate",
"schemaVersion": "1.27",
"createEntities": [
{
"client": {
"id": "client0",
"useMultipleMongoses": false,
"observeTracingMessages": {
"enableCommandPayload": true
}
}
},
{
"database": {
"id": "database0",
"client": "client0",
"databaseName": "operation-aggregate"
}
},
{
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "test"
}
}
],
"tests": [
{
"description": "aggregation",
"operations": [
{
"name": "aggregate",
"object": "collection0",
"arguments": {
"pipeline": [
{
"$match": {
"_id": 1
}
}
]
}
}
],
"expectTracingMessages": [
{
"client": "client0",
"ignoreExtraSpans": false,
"spans": [
{
"name": "aggregate operation-aggregate.test",
"attributes": {
"db.system.name": "mongodb",
"db.namespace": "operation-aggregate",
"db.collection.name": "test",
"db.operation.name": "aggregate",
"db.operation.summary": "aggregate operation-aggregate.test"
},
"nested": [
{
"name": "aggregate",
"attributes": {
"db.system.name": "mongodb",
"db.namespace": "operation-aggregate",
"db.collection.name": "test",
"db.command.name": "aggregate",
"network.transport": "tcp",
"db.response.status_code": {
"$$exists": false
},
"exception.message": {
"$$exists": false
},
"exception.type": {
"$$exists": false
},
"exception.stacktrace": {
"$$exists": false
},
"server.address": {
"$$type": "string"
},
"server.port": {
"$$type": [
"int",
"long"
]
},
"db.query.summary": "aggregate operation-aggregate.test",
"db.query.text": {
"$$matchAsDocument": {
"$$matchAsRoot": {
"aggregate": "test",
"pipeline": [
{
"$match": {
"_id": 1
}
}
]
}
}
},
"db.mongodb.server_connection_id": {
"$$type": [
"int",
"long"
]
},
"db.mongodb.driver_connection_id": {
"$$type": [
"int",
"long"
]
}
}
}
]
}
]
}
]
}
]
}
62 changes: 62 additions & 0 deletions specifications/open-telemetry/operation/aggregate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
description: operation aggregate
schemaVersion: '1.27'
createEntities:
- client:
id: &client0 client0
useMultipleMongoses: false
observeTracingMessages:
enableCommandPayload: true
- database:
id: &database0 database0
client: *client0
databaseName: operation-aggregate
- collection:
id: &collection0 collection0
database: *database0
collectionName: &collectionName0 test

tests:
- description: aggregation
operations:
- name: aggregate
object: *collection0
arguments:
pipeline: &pipeline0
- $match: { _id: 1 }

expectTracingMessages:
- client: *client0
ignoreExtraSpans: false
spans:
- name: aggregate operation-aggregate.test
attributes:
db.system.name: mongodb
db.namespace: operation-aggregate
db.collection.name: test
db.operation.name: aggregate
db.operation.summary: aggregate operation-aggregate.test

nested:
- name: aggregate
attributes:
db.system.name: mongodb
db.namespace: operation-aggregate
db.collection.name: *collectionName0
db.command.name: aggregate
network.transport: tcp
db.response.status_code: { $$exists: false }
exception.message: { $$exists: false }
exception.type: { $$exists: false }
exception.stacktrace: { $$exists: false }
server.address: { $$type: string }
server.port: { $$type: [int, long] }
db.query.summary: aggregate operation-aggregate.test
db.query.text:
$$matchAsDocument:
$$matchAsRoot:
aggregate: test
pipeline: *pipeline0
db.mongodb.server_connection_id:
$$type: [ int, long ]
db.mongodb.driver_connection_id:
$$type: [ int, long ]
Loading