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

Enhanced database reporting for mongoose not working #1382

Closed
VikramTiwari opened this issue Sep 2, 2021 · 5 comments
Closed

Enhanced database reporting for mongoose not working #1382

VikramTiwari opened this issue Sep 2, 2021 · 5 comments
Assignees
Labels
api: cloudtrace Issues related to the googleapis/cloud-trace-nodejs API. priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@VikramTiwari
Copy link
Contributor

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

  1. Is this a client library issue or a product issue?
    Client library

  2. Did someone already solve this?
    No

  3. Do you have a support contract?
    No

Environment details

  • OS: macos and debian
  • Node.js version: 14.17.0
  • npm version: 6.14.13
  • @google-cloud/trace-agent version: 5.1.5

Steps to reproduce

Since I don't see an open issue about mongoose tracking, I am assuming this is something to do with my setup.

  • data-models: internal npm package that contains all mongoose schema and methods
  • API: where this package is imported and mongoose schema and methods are utilized

Sample:

async function getAdmins(req, res, next) {
  try {
    const admins = await User.find({level: `admin`})
    return res.status(200).json({
      admins,
    })
  } catch (error) {
    next(error)
  }
}
router.get(`/admins`, getAdmins)

Here the User is coming from the data-models package. I can see the request trace in cloud trace but I don't see database spans along with the API.

Tracer config:

const traceConfig = {
  samplingRate: 5,
  enhancedDatabaseReporting: true,
  ignoreMethods: [`OPTIONS`],
  ignoreUrls: [`^/$`],
  flushDelaySeconds: 1
}
const tracer = require(`@google-cloud/trace-agent`).start(traceConfig)

Any reason this setup might not work as expected?

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

@product-auto-label product-auto-label bot added the api: cloudtrace Issues related to the googleapis/cloud-trace-nodejs API. label Sep 2, 2021
@bcoe bcoe added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Sep 7, 2021
@gilles-yvetot
Copy link

@bcoe any news on that ? Is there anything I can do to help you with that?

@bcoe
Copy link
Contributor

bcoe commented Nov 8, 2021

@gilles-yvetot unfortunately we don't currently have someone working on this bug. We make a best effort to address bugs within 180 days, so I'm hopeful this will be fixed in the not too distant future.

@gkf gkf self-assigned this Nov 23, 2021
@gkf
Copy link
Member

gkf commented Dec 7, 2021

Hi @VikramTiwari, which version of mongoose are you using? Unfortunately only mongoose versions 4 - 5 are supported and version 6 is not supported. Support for version 6 is tracked by #1401.

@VikramTiwari
Copy link
Contributor Author

Hey @gkf We were using mongoose v4 and it wasn't working. Since then we have migrated to mongoose v6 and we are now using open telemetry for capturing and pushing to cloud trace. Sorry about not being able to help here anymore.

@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Mar 1, 2022
gcf-owl-bot bot added a commit that referenced this issue Apr 1, 2022
…1382)

* chore: Enable Size-Label bot in all googleapis NodeJs repositories

Auto-label T-shirt size indicator should be assigned on every new pull request in all googleapis NodeJs repositories

* Remove product

Remove product since it is by default true
Source-Link: googleapis/synthtool@f1562fa
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:bb4d47d0e770abad62699a4664ce6b9ff1629d50c276a6c75860a6a1853dd19b
gcf-merge-on-green bot pushed a commit that referenced this issue Apr 4, 2022
…1382) (#1431)

* chore: Enable Size-Label bot in all googleapis NodeJs repositories

Auto-label T-shirt size indicator should be assigned on every new pull request in all googleapis NodeJs repositories

* Remove product

Remove product since it is by default true
Source-Link: googleapis/synthtool@f1562fa
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:bb4d47d0e770abad62699a4664ce6b9ff1629d50c276a6c75860a6a1853dd19b
@punya
Copy link
Contributor

punya commented Aug 16, 2022

Closing this out - people who need improved Mongoose telemetry should consider using OTel instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudtrace Issues related to the googleapis/cloud-trace-nodejs API. priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

6 participants