-
Notifications
You must be signed in to change notification settings - Fork 246
DRIVERS-719 OpenTelemetry specification #1826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…logy. Adding toplogy requirements for transaction tests
source/unified-test-format/tests/invalid/expectedTracingSpans-spanMalformedMissingName.yml
Outdated
Show resolved
Hide resolved
source/unified-test-format/tests/invalid/expectedTracingSpans-spanMalformedMissingName.yml
Outdated
Show resolved
Hide resolved
source/unified-test-format/tests/invalid/expectedTracingSpans-spanMalformedTagsMustBeObject.yml
Outdated
Show resolved
Hide resolved
source/unified-test-format/tests/invalid/expectedTracingSpans-spanMalformedTagsMustBeObject.yml
Outdated
Show resolved
Hide resolved
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>
…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`. |
There was a problem hiding this comment.
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`. |
There was a problem hiding this comment.
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
Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
1a4c85c
to
39863b0
Compare
- **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`. |
There was a problem hiding this comment.
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 | |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This typo still exists.
DRIVERS-719
observeTracingMessages
andexpectTracingMessages