Skip to content

Commit

Permalink
updating otel dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar committed Apr 24, 2024
1 parent 7b4c1e3 commit 3465054
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/src/middlewares/instrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const instrumentRoute = () => {
const isFixed = query.isFixed === 'true';

const parentContext = propagation.extract(context.active(), headers);
console.log('@@>> Requesting method', method, route, headers);
const span = await createSpanFromContext(`${method} ${route}`, parentContext, { kind: SpanKind.SERVER });

try {
Expand All @@ -34,7 +35,6 @@ const instrumentRoute = () => {
[SemanticAttributes.HTTP_CLIENT_IP]: ip,
[SemanticAttributes.HTTP_METHOD]: method,
[SemanticAttributes.HTTP_HOST]: host,
[SemanticAttributes.HTTP_SCHEME]: protocol,
[SemanticAttributes.HTTP_USER_AGENT]: headers['user-agent'] || '',

...(isFixed
Expand Down
2 changes: 1 addition & 1 deletion web/src/utils/tracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const createTracer = async () => {
propagator: new CompositePropagator({
propagators: [new W3CBaggagePropagator(), new W3CTraceContextPropagator()],
}),
});
});

registerInstrumentations({
tracerProvider: provider,
Expand Down

0 comments on commit 3465054

Please sign in to comment.