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-core plugin not loading, and not collecting traces #621

Closed
shaz1v opened this issue Dec 14, 2019 · 4 comments
Closed

mongodb-core plugin not loading, and not collecting traces #621

shaz1v opened this issue Dec 14, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@shaz1v
Copy link

shaz1v commented Dec 14, 2019

What version of OpenTelemetry are you using?

0.3.0

What version of Node are you using?

v10.15.3

What did you do?

Load mongodb-core plugin into the NodeTracer this way:

const tracer = new NodeTracer({
  plugins: {
    'mongodb-core': {
      enabled: true,
      path: '@opentelemetry/plugin-mongodb-core',
    },
    http: {
      enabled: true,
      path: '@opentelemetry/plugin-http',
      config: {
        ignoreIncomingPaths: [/^\/healthz/],
      },
    },
    https: {
      enabled: true,
      path: '@opentelemetry/plugin-https',
      config: {
        ignoreIncomingPaths: [/^\/healthz/],
      },
    },
    dns: {
      enabled: true,
      path: '@opentelemetry/plugin-dns',
      ignoreHostnames: ['localhost'],
    },
  },
})

What did you expect to see?

The plugin being loaded and patches applied

What did you see instead?

The plugin wasn't loaded, only other plugins listed did

PluginLoader#load: trying loading http@10.15.3
PluginLoader#load: applying patch to http@10.15.3 using @opentelemetry/plugin-http module
applying patch to http@10.15.3
PluginLoader#load: trying loading https@10.15.3
PluginLoader#load: applying patch to https@10.15.3 using @opentelemetry/plugin-https module
applying patch to https@10.15.3
PluginLoader#load: trying loading dns@10.15.3
PluginLoader#load: applying patch to dns@10.15.3 using @opentelemetry/plugin-dns module
applying patch to dns@10.15.3
patch lookup function
patch lookup function

Additional context

The plugin was loaded when I changed the key to mongodb only

  plugins: {
    mongodb: {
      enabled: true,
      path: '@opentelemetry/plugin-mongodb-core',
    },
  },
PluginLoader#load: trying loading mongodb@3.3.5
PluginLoader#load: applying patch to mongodb@3.3.5 using @opentelemetry/plugin-mongodb-core module

Although, with this change, not sure if related to it, traces of mongodb operations are not being collected at all

Thanks!

@shaz1v shaz1v added the bug Something isn't working label Dec 14, 2019
@vmarchaud
Copy link
Member

Sadly the plugin isn't compatible with mongodb > 3.3 (since they changed some stuff internally) so i believe this issue should be a feature request to support it

@mayurkale22
Copy link
Member

I think as we are patchingmongodb module, the key should be mongodb instead of mongodb-core. @vmarchaud correct me if I am wrong.

@shaz1v
Copy link
Author

shaz1v commented Dec 15, 2019

Thanks! closing this, i've reopened a feature request for > 3.3 support
#622

@shaz1v shaz1v closed this as completed Dec 15, 2019
@vmarchaud
Copy link
Member

@mayurkale22 No we are currently patching mongodb-core only

pichlermarc pushed a commit to dynatrace-oss-contrib/opentelemetry-js that referenced this issue Dec 15, 2023
…n-telemetry#621)

* chore: change test utils files structure to match repo

* feat(test-utils): mocha plugin for instrumentation testing

* chore(instrumentation-mongodb): use test-utils to run tests

* chore: lint and revert dep remove

* Update packages/opentelemetry-test-utils/README.md

* style: rename registerInstrumentation function

* chore: fix lint

* fix: wrong import of test-utils package

* fix: entry point for test utils package

* style(test-utils): fix lint

* fix: don't hoist mocha for the plugin to take linked test-utils

* ci: also don't hoist ts-mocha

* chore: remove test-utils from root package.json
pichlermarc pushed a commit to dynatrace-oss-contrib/opentelemetry-js that referenced this issue Dec 15, 2023
pichlermarc pushed a commit to dynatrace-oss-contrib/opentelemetry-js that referenced this issue Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants