Skip to content

Commit

Permalink
fix: move exporter options (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
saidsef authored Feb 22, 2025
1 parent 0b93197 commit 0b4c90a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions libs/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ export function setupTracing(options = {}) {
concurrencyLimit = 10,
} = options;

// Configure exporter with the Collector endpoint - uses gRPC
const exportOptions = {
concurrencyLimit: concurrencyLimit,
url: url,
timeoutMillis: 1000,
};

// Register the span processor with the tracer provider
const exporter = new OTLPTraceExporter(exportOptions);
const spanProcessor = new BatchSpanProcessor(exporter);
Expand Down Expand Up @@ -97,13 +104,6 @@ export function setupTracing(options = {}) {
}),
});

// Configure exporter with the Collector endpoint - uses gRPC
const exportOptions = {
concurrencyLimit: concurrencyLimit,
url: url,
timeoutMillis: 1000,
};

// Ignore spans from static assets.
const ignoreIncomingRequestHook = (req) => {
const isStaticAsset = !!req.url.match(/^\/metrics|\/healthz.*$/);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@saidsef/tracing-node",
"version": "3.2.2",
"version": "3.2.3",
"description": "tracing NodeJS - This is a wrapper for OpenTelemetry instrumentation packages",
"main": "libs/index.mjs",
"scripts": {
Expand Down

0 comments on commit 0b4c90a

Please sign in to comment.