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

"mongodb" module instrumentation is missing "destination" context #1892

Closed
trentm opened this issue Nov 25, 2020 · 0 comments · Fixed by #1893
Closed

"mongodb" module instrumentation is missing "destination" context #1892

trentm opened this issue Nov 25, 2020 · 0 comments · Fixed by #1893
Assignees
Labels
agent-nodejs Make available for APM Agents project planning.

Comments

@trentm
Copy link
Member

trentm commented Nov 25, 2020

Spans emitted by the instrumentation of the mongodb module do not include the "destination" fields. The destination fields (specifically destination.service.resource) are used by Kibana's APM "Service Map" to display a node for downstream services.

Note that other MongoDB-related Node.js packages, like "mongoose", use the mongodb module, so are also affected.

E.g. here is an Elasticsearch span with "destination":

{
  "span": {
    "name": "Elasticsearch: POST /kibana_sample_data_logs/_search",
    "type": "db",
    "id": "891b874cc027aac5",
    "transaction_id": "8cc190e0bf8c117f",
    "parent_id": "8cc190e0bf8c117f",
    "trace_id": "a2ac5d4ddd06d0ea19ddd2fd8d8cd681",
    "subtype": "elasticsearch",
    "action": "request",
    "timestamp": 1606331068870301,
    "duration": 4.103,
    "context": {
      "db": {
        "type": "elasticsearch",
        "statement": "{\"size\":1,\"query\":{\"match_all\":{}}}"
      },
      "destination": {
        "service": {
          "name": "elasticsearch",
          "resource": "elasticsearch",
          "type": "db"
        },
        "address": "localhost",
        "port": 9200
      }
    },
    "sync": false,
    "outcome": "unknown"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-nodejs Make available for APM Agents project planning.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant