Skip to content

Queries completing with errors do not set span error tag #11

@epkugelmass

Description

@epkugelmass

Expected:
When a CRUD operation fails against Mongo due to a constraint violation (and the Mongo java driver throws a MongoException), the corresponding CommandEvent span should have the "error" tag set to true and a log message with relevant details.

Actual:
The span does not have the "error" tag set.

Cause:
TracingCommandListener only sets the "error" tag on a CommandFailedEvent. According to https://github.com/mongodb/specifications/blob/master/source/command-monitoring/command-monitoring.rst#succeeded-or-failed, command success does not indicate that the CRUD operation actually completed without error, only that the server was able to try to execute it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions