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
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+10-12Lines changed: 10 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,7 +117,7 @@ The required steps to start development on a pacakge are:
117
117
118
118
-`npm ci` from root folder to install dependencies ([see npm-ci docs](https://docs.npmjs.com/cli/v10/commands/npm-ci))
119
119
-`cd` into the pacakge you want to apply changes.
120
-
-`npm run setup:dev` compiles the TypeScript files for this package and its dependencies within the repository.
120
+
-`npm run compile:with-dependencies` compiles the TypeScript files for this package and its dependencies within the repository.
121
121
122
122
Then you can proceed to do apply the changes and use the scripts below for development workflow
123
123
@@ -146,23 +146,21 @@ npm test
146
146
However, some instrumentations require test-services to be running (e.g. the `instrumentation-mongodb` package requires a MongoDB server). Use the `test-services`-related npm scripts to start all required services in Docker and then run the tests with the appropriate configuration to use those services:
147
147
148
148
```sh
149
-
npm run test-services:start # starts services in Docker
150
-
npm run test:with-services-config# runs 'npm test' with envvars from test/test-services.env
151
-
npm run test-services:stop # stops services in Docker
149
+
npm run test-services:start # starts services in Docker
150
+
npm run test:with-services-env# runs 'npm test' with envvars from test/test-services.env
151
+
npm run test-services:stop # stops services in Docker
152
152
```
153
153
154
-
If you only want to test a single package (e.g. the `instrumentation-mongodb`) you can `cd` into it and run the tests after you started the services.
154
+
If you only want to test a single package that dfepends on a service (e.g. the `instrumentation-mongodb`) you can `cd` into it and
155
+
use the same scripts for testing. In this case the script will only start the services needed to test the package.
155
156
156
157
```sh
157
-
npm run test-services:start # starts services in Docker
158
-
cd packages/instrumentation-mongodb # get into the instrumenation folder
159
-
RUN_MONGODB_TESTS=1 npm test# run the test with the proper config (check each package)
160
-
cd ../../.. # go back to root folder
161
-
npm run test-services:stop # stops services in Docker
158
+
cd packages/instrumentation-mongodb # get into the instrumenation folder
159
+
npm run test-services:start # start the MongoDB service in Docker
160
+
npm run test:with-services-env # runs 'npm test' with envvars from test/test-services.env
161
+
npm run test-services:stop # stop MongoDB service in Docker
162
162
```
163
163
164
-
NOTE: scripts for each package will be added to avoid extra consumption of resources and improve the development experience.
165
-
166
164
### Benchmarks
167
165
168
166
When two or more approaches must be compared, please write a benchmark in the benchmark/index.js module so that we can keep track of the most efficient algorithm.
0 commit comments