Skip to content

Commit

Permalink
test: test
Browse files Browse the repository at this point in the history
  • Loading branch information
aryamohanan committed May 22, 2024
1 parent 9b6ae35 commit e810212
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Production dependencies that are required by a package always need to be added t

The following sections describe how to manage dependencies in practice.

### Adding A Package Dependency
### Adding A Package Dependency npm install import-in-the-middle -w packages/core

`npm install -D ${dependency-name}`: Adds a dev dependency to the root `package.json` file.
`npm install ${dependency-name} -w packages/collector`: Adds a production dependency to the package `@instana/collector`. This is equivalent to `cd packages/collector; npm install ${dependency-name}`.
Expand Down
5 changes: 2 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@
"graphql-tag": "2.12.6",
"graphql-ws": "^5.16.0",
"husky": "^7.0.4",
"import-in-the-middle": "^1.7.4",
"ioredis": "^5.4.1",
"js-yaml": "^4.1.0",
"kafka-node": "^5.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/collector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"@instana/core": "3.8.1",
"@instana/shared-metrics": "3.8.1",
"bunyan": "^1.8.15",
"import-in-the-middle": "^1.7.4",
"semver": "^7.5.4",
"serialize-error": "^8.1.0"
},
Expand Down
2 changes: 2 additions & 0 deletions packages/collector/src/agentConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ exports.sendMetrics = function sendMetrics(data, cb) {
* @param {(...args: *) => *} cb
*/
exports.sendSpans = function sendSpans(spans, cb) {
/* eslint-disable no-console */
console.log('here are the spans', spans);
const callback = util.atMostOnce('callback for sendSpans', err => {
if (err && !maxContentErrorHasBeenLogged && err instanceof PayloadTooLargeError) {
logLargeSpans(spans);
Expand Down
2 changes: 1 addition & 1 deletion packages/collector/test/tracing/esm/iitm/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const constants = require('@instana/core').tracing.constants;

const mochaSuiteFn = supportedVersion(process.versions.node) ? describe : describe.skip;

mochaSuiteFn('[ESM] - iitm', function () {
mochaSuiteFn.only('[ESM] - iitm', function () {
this.timeout(config.getTestTimeout());

globalAgent.setUpCleanUpHooks();
Expand Down
1 change: 1 addition & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"@opentelemetry/instrumentation-tedious": "0.10.1",
"@opentelemetry/sdk-trace-base": "1.24.0",
"cls-bluebird": "^2.1.0",
"import-in-the-middle": "^1.7.4",
"lru-cache": "^10.1.0",
"methods": "^1.1.2",
"opentracing": "^0.14.5",
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/util/iitmHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
'use strict';

// eslint-disable-next-line instana/no-unsafe-require, import/no-extraneous-dependencies
const path = require('path');
const rootDir = path.resolve(__dirname, '../../../../');
const iitmHookPath = require.resolve('import-in-the-middle', { paths: [rootDir] });
const iitmHook = require(iitmHookPath);
// const path = require('path');
// const rootDir = path.resolve(__dirname, '../../../../');
// const iitmHookPath = require.resolve('import-in-the-middle', { paths: [rootDir] });
const iitmHook = require('import-in-the-middle');
const calculator = require('../tracing/instrumentation/test/calculator');
/* eslint-disable no-console */
function init() {
Expand Down

0 comments on commit e810212

Please sign in to comment.