elastic / elastic/apm-agent-java

Support the kmongo mongodb java driver wrapper

Open
#1,217 1 comment 1 reaction 0 assignees View on GitHub
instrumentation new-feature
Dominant language
Java
Stars
594
Forks
338
Avg merge
1d 13h
Merged PRs (30d)
25

Description

I saw that the mongodb java driver is supported as tracking database transactions with a neat feature of showing the document query.

Feature: https://github.com/elastic/apm-agent-java/pull/835/files

I am not able to get the functionality to work, however I am using Kotlin and the KMongo wrapper for this driver. KMongo uses the mongo java driver however, so I was hoping it would work as-is.

I have tried to use the trace methods feature to ensure the same classes are getting called
https://www.elastic.co/guide/en/apm/agent/java/current/config-core.html#config-trace-methods

I have used:
ELASTIC_APM_TRACE_METHODS":"com.mongodb.*MongoCollectionImpl*"

This does give me spans for the methods like find, insertOne, etc seen here:
![image](https://user-images.githubusercontent.com/24508237/83777621-4183b800-a64f-11ea-97f2-091449ad39b2.png)

However I cannot see the document queries.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.