Skip to content

Conversation

nhachicha
Copy link
Contributor

@nhachicha nhachicha commented Aug 8, 2025

DRIVERS-719

  • Update schema to 1.26
  • Added invalid test to unified test runner
  • Added nominal valid tests for the 3 tracing grouping (Operation, Cursor and Transaction)
  • Update description of the new field observeTracingMessages and expectTracingMessages
  • Merge back the draft spec into this

@nhachicha nhachicha self-assigned this Aug 8, 2025
@nhachicha nhachicha changed the title OpenTelemetry DRIVERS-719 OpenTelementry specification Aug 8, 2025
nhachicha and others added 8 commits August 14, 2025 17:48
Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
…TracingMessages-additionalProperties.yml

Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
…spanMalformedTagsMustBeObject.yml

Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
…TracingMessages-additionalPropertyType.yml

Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
…missingPropertySpans.yml

Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
…spanMalformedMissingName.yml

Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
…spanMalformedTagsMustBeObject.yml

Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
@nhachicha nhachicha requested review from GromNaN and blink1073 and removed request for blink1073 September 10, 2025 12:26
…summary with examples

- Adding test for abortTransaction
- Renaming transaction test to core_api
- **MongoClient Level**: Drivers SHOULD provide a configuration option for `MongoClient`'s Configuration/Settings that
enables or disables tracing for operations and commands executed with this client. This option MUST override
settings on higher levels. This configuration can be implemented with a `MongoClient` option, for example,
`tracing.enabled`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. We usually call out if an option should be URI, MongoClient settings, or both. Like for versioned api:
https://github.com/mongodb/specifications/blob/master/source/versioned-api/versioned-api.md#no-uri-options

Also can you clarify how tracing.enabled is supposed to be translated into code? Is it MongoClient(tracing=True), MongoClient(tracing="enabled"), or something else?

- **MongoClient Level**: Drivers SHOULD provide a configuration option for `MongoClient`'s Configuration/Settings that
enables or disables tracing for operations and commands executed with this client. This option MUST override
settings on higher levels. This configuration can be implemented with a `MongoClient` option, for example,
`tracing.enabled`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ShaneHarvey: thanks for bringing up the typing. If this really is just a boolean type, I think tracing or enableTracing (more active language than tracingEnabled) with a default value of false would be most consistent with other driver option names in PHP. But since these aren't URI options there should be more naming flexibility available for drivers.

It looks like @comandeo-mongo is talking about this in a comment below, too: https://github.com/mongodb/specifications/pull/1826/files#r2339648026

@kevinAlbs kevinAlbs changed the title DRIVERS-719 OpenTelementry specification DRIVERS-719 OpenTelemetry specification Sep 17, 2025
- **MongoClient Level**: Drivers SHOULD provide a configuration option for `MongoClient`'s Configuration/Settings that
enables or disables tracing for operations and commands executed with this client. This option MUST override
settings on higher levels. This configuration can be implemented with a `MongoClient` option, for example,
`tracing.enabled`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nhachicha: Do you want to chime in here?

| `db.query.text` | `string` | Database command that was sent to the server. Content should be equivalent to the `document` field of the CommandStartedEvent of the command monitoring. | Conditional |
| `db.mongodb.cursor_id` | `int64` | If a cursor is created or used in the operation | Required if available |
| `db.mongodb.lsid` | `string` | Logical session id | Required is available |
| `db.mongodb.txn_number` | `int64` | Transaction number | Required is available |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for lsid and txn_number: is -> if

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks!

##### Exceptions

If the driver operation fails with an exception, drivers MUST record an exception to the current operation span. When
recording an exception, drivers SHOULD add the following attributes to the span, when the content for the attribute if
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This typo still exists.

@nhachicha nhachicha merged commit f2912ba into master Sep 23, 2025
6 checks passed
@nhachicha nhachicha deleted the DRIVERS-719 branch September 23, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants