You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to get the opentelemetry stuff working with mocha and I have been able to get each test wrapped correctly in a span by setting everything up in a tracing.js file that is used as a --require to mocha.
However, the code that is being tested doesn't seem to be getting instrumented properly. I have it configured to instrumentation individually and with the auto instrumentation, but none of the mysql2 or knex spans ever get logged, so I assume that they never get patched properly.
It may be worth noting that everything is compiled to commonjs first, then mocha is run all all .spec.js files in the dist output.
Is there anything special that must be done to get mocha to instrument the code being tested as well? Any project examples that anyone can point to that have opentelemetry working with mocha tests?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to get the opentelemetry stuff working with mocha and I have been able to get each test wrapped correctly in a span by setting everything up in a tracing.js file that is used as a --require to mocha.
However, the code that is being tested doesn't seem to be getting instrumented properly. I have it configured to instrumentation individually and with the auto instrumentation, but none of the mysql2 or knex spans ever get logged, so I assume that they never get patched properly.
It may be worth noting that everything is compiled to commonjs first, then mocha is run all all .spec.js files in the dist output.
Is there anything special that must be done to get mocha to instrument the code being tested as well? Any project examples that anyone can point to that have opentelemetry working with mocha tests?
Beta Was this translation helpful? Give feedback.
All reactions