@inkeep/agents-run-api 0.14.2 → 0.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-Z76LOSTO.js → chunk-USFUAR3Y.js} +14 -5
- package/dist/index.cjs +235 -223
- package/dist/index.js +1 -1
- package/dist/instrumentation.cjs +15 -3
- package/dist/instrumentation.d.cts +2 -2
- package/dist/instrumentation.d.ts +2 -2
- package/dist/instrumentation.js +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getLogger } from './chunk-A2S7GSHL.js';
|
|
1
2
|
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';
|
|
2
3
|
import { BaggageSpanProcessor, ALLOW_ALL_BAGGAGE_KEYS } from '@opentelemetry/baggage-span-processor';
|
|
3
4
|
import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-hooks';
|
|
@@ -5,14 +6,22 @@ import { CompositePropagator, W3CTraceContextPropagator, W3CBaggagePropagator }
|
|
|
5
6
|
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
|
|
6
7
|
import { resourceFromAttributes } from '@opentelemetry/resources';
|
|
7
8
|
import { NodeSDK } from '@opentelemetry/sdk-node';
|
|
8
|
-
import { BatchSpanProcessor } from '@opentelemetry/sdk-trace-base';
|
|
9
|
+
import { BatchSpanProcessor, NoopSpanProcessor } from '@opentelemetry/sdk-trace-base';
|
|
9
10
|
import { ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions';
|
|
10
11
|
|
|
11
|
-
// src/instrumentation.ts
|
|
12
12
|
var otlpExporter = new OTLPTraceExporter();
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
var logger = getLogger("instrumentation");
|
|
14
|
+
function createSafeBatchProcessor() {
|
|
15
|
+
try {
|
|
16
|
+
return new BatchSpanProcessor(otlpExporter, {
|
|
17
|
+
scheduledDelayMillis: 1e3
|
|
18
|
+
});
|
|
19
|
+
} catch (error) {
|
|
20
|
+
logger.warn({ error }, "Failed to create batch processor");
|
|
21
|
+
return new NoopSpanProcessor();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
var defaultBatchProcessor = createSafeBatchProcessor();
|
|
16
25
|
var defaultResource = resourceFromAttributes({
|
|
17
26
|
[ATTR_SERVICE_NAME]: "inkeep-agents-run-api"
|
|
18
27
|
});
|