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
chore: moves express examples into its package to establish pattern (open-telemetry#939)
* chore: moves express examples into its package to establish pattern
* revert: unintentional path change
* fix: uses more correct value
* chore: bumps dependency versions
* Adds instructions for migrating examples
* Update plugins/node/opentelemetry-instrumentation-express/examples/package.json
Co-authored-by: Gerhard Stöbich <[email protected]>
* Update plugins/node/opentelemetry-instrumentation-express/examples/package.json
Co-authored-by: Gerhard Stöbich <[email protected]>
* ignores examples from lint
* removes extra line
* bumps otel dependency versions
* cleanup
* updates to use package name instead of relative path
* updates CI approach to use lerna run command
* bumps dependency versions
Co-authored-by: Gerhard Stöbich <[email protected]>
Co-authored-by: Rauno Viskus <[email protected]>
:warning: Note: We are working on migrating these examples to their respective package directories.
4
+
5
+
For instance, examples of using `express` instrumentation have moved from this directory to [plugins/node/opentelemetry-instrumentation-express](https://github.com/open-telemetry/opentelemetry-js/tree/main/plugins/node/opentelemetry-instrumentation-express).
6
+
7
+
## Instructions for Migrating an Example
8
+
9
+
*[ ] Move the files
10
+
*[ ] Choose an instrumentation package to migrate examples for.
11
+
*[ ] Move the examples from `./examples/[name]` to `./plugins/[node or web]]/opentelemetry-instrumentation-[name]/examples`.
12
+
*[ ] Update the `package.json` in the examples folder
13
+
*[ ] Remove the `@opentelemetry/instrumentation-[name]` dependency.
14
+
*[ ] Install `typescript` and `ts-node` in the examples directory.
15
+
*[ ] Replace usage of `node` in scripts with `ts-node`.
16
+
*[ ] Add a script for compiling the code in scripts: `"compile": "tsc -p ."`
17
+
*[ ] Add a tsconfig.json file in the examples folder. (Example below)
18
+
*[ ] Update the code
19
+
*[ ] Change code to use a relative import of the library.
20
+
*[ ] Add types to the code
21
+
*[ ] Update the instrumentation package's `package.json`
22
+
*[ ] Add a script `"compile:examples": "cd examples && npm run compile",`.
23
+
*[ ] Test the updated code
24
+
*[ ] Test building the examples by running `npm run compile:examples`
25
+
*[ ] Test that the actual exapmle code runs as expected
0 commit comments