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
@@ -42,7 +42,7 @@ In order to trace your application, the following OpenTelemetry JavaScript packa
42
42
```bash
43
43
npm install --save \
44
44
@opentelemetry/api \
45
-
@opentelemetry/sdk-trace-node \
45
+
opentelemetry/sdk-node \
46
46
@opentelemetry/exporter-trace-otlp-grpc
47
47
```
48
48
@@ -62,50 +62,51 @@ npm install --save \
62
62
63
63
In order to send trace data to AWS X-Ray via the ADOT Collector, you must configure the X-Ray ID generator, X-Ray propagator, and collector gRPC exporter on the global tracer provider.
To see what attributes are captured and how to add other resource detectors, see the [OpenTelemetry documentation](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/detectors/node/opentelemetry-resource-detector-aws#readme).
134
135
136
+
### Adding support for Metrics
137
+
138
+
The API and SDK for Metrics became stable for OpenTelemetry for JavaScript.
139
+
The following piece of code initialize the OpenTelemetry SDK to use Metrics and Traces.
.then(() =>console.log('Tracing and Metrics terminated'))
177
+
.catch((error) =>console.log('Error terminating tracing and metrics', error))
178
+
.finally(() =>process.exit(0));
179
+
});
180
+
}
181
+
```
182
+
135
183
### Debug Logging
136
184
137
185
To enable debug logging for the OpenTelemetry SDK, configure the provided Diag logger as follows. Do this as early in your program as possible to capture all OpenTelemetry SDK behavior.
@@ -166,15 +214,17 @@ Then register the AWS SDK instrumentation as follows:
Similarly to Traces, you can create custom metrics in your application using the OpenTelemetry API and SDK.
264
+
Refer to <Linkto="/docs/getting-started/js-sdk/metric-manual-instr">Metric-Manual-Instrumentation</Link> for introduction to metric creation using OpenTelemetry JavaScript SDK.
265
+
211
266
212
267
## Sample Application
213
268
214
-
See the [AWS Distro for OpenTelemetry Sample Code with JavaScript SDK](https://github.com/aws-observability/aws-otel-js/tree/main/sample-apps) for instructions on setting up and using the sample app.
269
+
See the [AWS Distro for OpenTelemetry Sample Code with JavaScript SDK](https://github.com/aws-observability/aws-otel-community/tree/master/sample-apps/javascript-sample-app) for instructions on setting up and using the sample app.
0 commit comments