Skip to content

Commit

Permalink
update major ver deps
Browse files Browse the repository at this point in the history
  • Loading branch information
icebob committed Apr 2, 2024
1 parent df3d070 commit 3808890
Show file tree
Hide file tree
Showing 3 changed files with 877 additions and 994 deletions.
6 changes: 3 additions & 3 deletions examples/opentelemetry/opentelemetry.middleware.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const _ = require("lodash");
const { isFunction, isPlainObject, safetyObject } = require("moleculer").Utils;
const { api } = require("@opentelemetry/sdk-node");
const { SemanticResourceAttributes } = require("@opentelemetry/semantic-conventions");
const { SEMRESATTRS_SERVICE_NAME } = require("@opentelemetry/semantic-conventions");

const tracer = api.trace.getTracer("moleculer-otel");

Expand Down Expand Up @@ -109,7 +109,7 @@ module.exports = {
{ attributes: flattenTags(tags), kind: api.SpanKind.CONSUMER },
parentCtx
);
span.setAttribute(SemanticResourceAttributes.SERVICE_NAME, action.service.fullName);
span.setAttribute(SEMRESATTRS_SERVICE_NAME, action.service.fullName);
const spanContext = api.trace.setSpan(api.context.active(), span);
return api.context.with(spanContext, () => {
// Call the handler
Expand Down Expand Up @@ -166,7 +166,7 @@ module.exports = {
},
parentContext
);
span.setAttribute(SemanticResourceAttributes.SERVICE_NAME, action.service.fullName);
span.setAttribute(SEMRESATTRS_SERVICE_NAME, action.service.fullName);

const spanContext = api.trace.setSpan(api.context.active(), span);
ctx.meta.$otel = {};
Expand Down
Loading

0 comments on commit 3808890

Please sign in to comment.