Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31674,6 +31674,13 @@ async function run() {
const apiUrl = process.env.STREETRACE_API_URL || 'https://api.streetrace.ai/';
const apiKey = process.env.STREETRACE_API_KEY;

// OTEL configuration with defaults (can be overridden via env)
const otelEndpoint =
process.env.OTEL_EXPORTER_OTLP_ENDPOINT ||
'https://api.streetrace.ai/api/public/otel/v1/traces';
const otelHeaders =
process.env.OTEL_EXPORTER_OTLP_HEADERS || `Authorization=${apiKey}`;

if (!apiKey) {
throw new Error('STREETRACE_API_KEY environment variable is required');
}
Expand Down Expand Up @@ -31750,6 +31757,8 @@ async function run() {
},
env: {
...process.env, // This already includes STREETRACE_API_KEY and other environment variables
OTEL_EXPORTER_OTLP_ENDPOINT: otelEndpoint,
OTEL_EXPORTER_OTLP_HEADERS: otelHeaders,
},
};

Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ async function run() {
const apiUrl = process.env.STREETRACE_API_URL || 'https://api.streetrace.ai/';
const apiKey = process.env.STREETRACE_API_KEY;

// OTEL configuration with defaults (can be overridden via env)
const otelEndpoint =
process.env.OTEL_EXPORTER_OTLP_ENDPOINT ||
'https://api.streetrace.ai/api/public/otel/v1/traces';
const otelHeaders =
process.env.OTEL_EXPORTER_OTLP_HEADERS || `Authorization=${apiKey}`;

if (!apiKey) {
throw new Error('STREETRACE_API_KEY environment variable is required');
}
Expand Down Expand Up @@ -85,6 +92,8 @@ async function run() {
},
env: {
...process.env, // This already includes STREETRACE_API_KEY and other environment variables
OTEL_EXPORTER_OTLP_ENDPOINT: otelEndpoint,
OTEL_EXPORTER_OTLP_HEADERS: otelHeaders,
},
};

Expand Down
Loading