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: getting-started/ts-example/README.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,15 +54,17 @@ This guide uses the example application provided in the [example directory](exam
54
54
55
55
([link to JavaScript version](../README.md#install-the-required-opentelemetry-libraries))
56
56
57
-
To create traces on NodeJS, you will need `@opentelemetry/sdk-trace-node`, `@opentelemetry/core`, and any plugins required by your application such as gRPC, or HTTP. If you are using the example application, you will need to install `@opentelemetry/plugin-http`.
57
+
To create traces on NodeJS, you will need `@opentelemetry/sdk-trace-node`, `@opentelemetry/api`, and any plugins required by your application such as gRPC, or HTTP. If you are using the example application, you will need to install `@opentelemetry/instrumentation-http` and `@opentelemetry/instrumentation-express`.
58
58
59
59
```sh
60
60
$ npm install \
61
-
@opentelemetry/core \
61
+
@opentelemetry/api \
62
62
@opentelemetry/sdk-trace-node \
63
63
@opentelemetry/instrumentation \
64
64
@opentelemetry/instrumentation-http \
65
-
@opentelemetry/instrumentation-express
65
+
@opentelemetry/instrumentation-express \
66
+
@@opentelemetry/resources \
67
+
@opentelemetry/semantic-conventions
66
68
```
67
69
68
70
#### Initialize a global tracer
@@ -74,16 +76,16 @@ All tracing initialization should happen before your application’s code runs.
74
76
Create a file named `tracing.ts` and add the following code:
After these dependencies are installed, we will need to initialize and register them. Modify `tracing.ts` so that it matches the following code snippet, replacing the service name `"getting-started"` with your own service name if you wish.
0 commit comments