Skip to content

Commit

Permalink
Prevent using telemetry if ZIPKIN_URL is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
ggodlewski authored and horner committed Dec 3, 2022
1 parent 0645e55 commit 4b27b68
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ let provider: NodeTracerProvider;

export function TelemetryClass() {
return function (classObj) {
if (!process.env.ZIPKIN_URL) {
return;
}

const stackTrace = new Error().stack.split('\n');
if (stackTrace.length < 3) {
return;
Expand Down

0 comments on commit 4b27b68

Please sign in to comment.