Skip to content

Mongo dbo demo#281

Draft
xuan-cao-swi wants to merge 5 commits into
mainfrom
mongo-dbo-demo
Draft

Mongo dbo demo#281
xuan-cao-swi wants to merge 5 commits into
mainfrom
mongo-dbo-demo

Conversation

@xuan-cao-swi

Copy link
Copy Markdown
Contributor

Description

Two different patch:

  1. for mongo < 2.23.0, without native otel support, it patch the Mongo::Server::ConnectionBase.deliver
  2. for mongo >= 2.23.0, with native otel support, it patch the Mongo::Tracing::OpenTelemetry::OperationTracer.execute_with_span

Test (if applicable)

# ConnectionBase#deliver exists before 2.22.0 and remains the common
# serialization path in 2.23.0 and newer. Do not couple this patch to
# either of the driver's OpenTelemetry integration implementations.
if defined?(::Mongo::Server::ConnectionBase)
# serialization path in 2.23.0 and newer. Do not couple this patch to
# either of the driver's OpenTelemetry integration implementations.
if defined?(::Mongo::Server::ConnectionBase)
::Mongo::Server::ConnectionBase.prepend(
# either of the driver's OpenTelemetry integration implementations.
if defined?(::Mongo::Server::ConnectionBase)
::Mongo::Server::ConnectionBase.prepend(
::SolarWindsAPM::Patch::TagSql::SWOMongoPatch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants