From e4f9fb2245fa8c3dbf9cfa9dd2554bf539d13679 Mon Sep 17 00:00:00 2001 From: Wolfgang Ziegler Date: Tue, 5 Oct 2021 11:44:28 +0200 Subject: [PATCH] Fix usage of renamed enum `SpanStatusCode`. --- examples/postgres/server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/postgres/server.js b/examples/postgres/server.js index e9c733edde..1c2ac91c54 100644 --- a/examples/postgres/server.js +++ b/examples/postgres/server.js @@ -3,7 +3,7 @@ const api = require('@opentelemetry/api'); // eslint-disable-next-line import/order const tracer = require('./tracer')('postgres-server-service'); -const { SpanKind, StatusCode } = require('@opentelemetry/api'); +const { SpanKind, SpanStatusCode } = require('@opentelemetry/api'); const express = require('express'); const setupPg = require('./setupPsql'); @@ -41,7 +41,7 @@ app.get('/:cmd', (req, res) => { }); } catch (e) { res.status(400).send({ message: e.message }); - span.setStatus(StatusCode.ERROR); + span.setStatus(SpanStatusCode.ERROR); } span.end(); });