Skip to content

Exception in OperationCollectionSpanNameProvider, when Command value is an Integer #24

@peterfouquet0001

Description

@peterfouquet0001

I got many execptions from the TracingCommandListener, if the value for the command is not a String.
This happens for example by a ping command.

{"date": "2021-11-23 15:12:48,981", "vertical": "opal", "service": "product", "level": "WARN", "logger": "org.mongodb.driver.protocol.event", , "message": "Exception thrown raising command started event to listener io.opentracing.contrib.mongo.common.TracingCommandListener@3770dd80", "thread": "task-scheduler-2"}
org.bson.BsonInvalidOperationException: Value expected to be of type STRING is of unexpected type INT32
at org.bson.BsonValue.throwIfInvalidType(BsonValue.java:419)
at org.bson.BsonValue.asString(BsonValue.java:69)
at org.bson.BsonDocument.getString(BsonDocument.java:235)
at io.opentracing.contrib.mongo.common.providers.OperationCollectionSpanNameProvider.generateName(OperationCollectionSpanNameProvider.java:27)

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