Fix import (#2783)

This commit is contained in:
Joost Lekkerkerker 2023-05-24 16:47:14 +02:00 committed by GitHub
parent 50ad74b254
commit 3e9e073572
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -500,7 +500,7 @@ The status can be set at any time before the span is finished:
<!-- prettier-ignore-start -->
{{< tabpane langEqualsHeader=true >}}
{{< tab TypeScript >}}
import opentelemetry from "@opentelemetry/api";
import opentelemetry, { SpanStatusCode } from "@opentelemetry/api";
// ...
@ -508,7 +508,7 @@ tracer.startActiveSpan('app.doWork', span => {
for (let i = 0; i <= Math.floor(Math.random() * 40000000); i += 1) {
if (i > 10000) {
span.setStatus({
code: opentelemetry.SpanStatusCode.ERROR,
code: SpanStatusCode.ERROR,
message: 'Error'
});
}