isomerpages / isomercms-backend

A static website builder and host for the Singapore Government
5 stars 1 forks source link

fix(tracer): fix tag setting on span #1208

Closed seaerchin closed 7 months ago

seaerchin commented 7 months ago

Problem

we were setting the tags for the trace as a bootstrap process. this means that the tracer.init call does not bootstrap properly (as tracer.use is meant to be called at start-up, prior to actual tracing).

this PR changes it so that the tags are set on the span.

Solution

  1. instead of calling tracer.use, which is a bootstrap call, change to get the active span and calling setTag on that span.

Tests