Skip to content
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

Rewritable Tracer Not working for Mongo Driver #591

Open
Gaurang-Patel opened this issue Jul 30, 2020 · 0 comments
Open

Rewritable Tracer Not working for Mongo Driver #591

Gaurang-Patel opened this issue Jul 30, 2020 · 0 comments

Comments

@Gaurang-Patel
Copy link

Gaurang-Patel commented Jul 30, 2020

Hi ,
I'm trying this below rewriter json for mongo driver to add service tag to my spans, But it is not working .

{
  "mongo:driver": [
    {
      "input": {
        "type": "operationName"
      },
      "output": [
        {
          "type": "tag",
          "key": "service",
          "value": "my_service"
        }
      ]
    }
  ]
}

In my analysis what I've found out is inside RewritableTracer.buildSpan method it is not able to get the rule for mongo plugin as for Mongo spans are generated using CommandListener i.e TracingCommandListener.java

So Mongo Rule is not executed on every command of Mongo and currentPluginName is not set properly in AgentRule.getCurrentPluginName(); so It can't fine rule to rewrite traces.

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

No branches or pull requests

1 participant