Summary
raindrop-ai eagerly imports the full Traceloop SDK and its provider instrumentation packages even when configured to use an existing OpenTelemetry SDK and direct tool-span shipping:
new Raindrop({
writeKey,
useExternalOtel: true,
bypassOtelForTools: true,
});
Could Traceloop become a genuinely optional peer dependency, loaded only when a Traceloop-backed tracing mode is used? A lightweight entry point such as raindrop-ai/direct would also solve this if lazy loading is impractical.
Current behavior
In the configuration above:
- Traceloop is initialized with
tracingEnabled: false.
- Raindrop does not create an OTel SDK/provider/exporter.
interaction.trackTool() uses Raindrop's direct HTTP shipper.
- The consumer does not call
createSpanProcessor() or getInstrumentations().
Despite that, importing raindrop-ai eagerly resolves Traceloop and instrumentation packages for Anthropic, OpenAI, Bedrock, Vertex AI, Cohere, Pinecone, ChromaDB, Qdrant, and Together.
This materially increases installation and CI layer size for consumers that do not use those integrations.
Reproduction
0.2.4-otelv2 already declares @traceloop/node-server-sdk as an optional dependency, but omitting optional dependencies makes the base package unloadable:
mkdir /tmp/raindrop-no-optional
cd /tmp/raindrop-no-optional
npm init -y
npm install --omit=optional raindrop-ai@0.2.4-otelv2
node -e "require('raindrop-ai')"
Result:
Error: Cannot find module '@traceloop/instrumentation-anthropic'
Require stack:
- node_modules/raindrop-ai/dist/index.js
Size impact
Measured using fresh isolated npm installations on macOS:
| Package |
node_modules size |
raindrop-ai@0.1.3 |
238 MiB |
raindrop-ai@0.2.4 |
238 MiB |
raindrop-ai@0.2.4-otelv2 |
144 MiB |
raindrop-ai@0.2.4-otelv2 --omit=optional |
70 MiB, but import fails |
Exact sizes vary by platform, but the dependency difference is substantial.
Suggested behavior
- Declare Traceloop and its instrumentation packages as optional peer dependencies.
- Lazy-load them only when automatic/Traceloop-backed tracing is enabled.
- Allow
useExternalOtel: true plus bypassOtelForTools: true to work without Traceloop installed.
- Alternatively, expose a lightweight entry point that excludes Traceloop imports.
- Add a smoke test that installs with
--omit=optional and imports/constructs the direct/external-OTel configuration.
If Workshop is not the correct public tracker for the JavaScript SDK, please transfer or point me to the appropriate repository.
Summary
raindrop-aieagerly imports the full Traceloop SDK and its provider instrumentation packages even when configured to use an existing OpenTelemetry SDK and direct tool-span shipping:Could Traceloop become a genuinely optional peer dependency, loaded only when a Traceloop-backed tracing mode is used? A lightweight entry point such as
raindrop-ai/directwould also solve this if lazy loading is impractical.Current behavior
In the configuration above:
tracingEnabled: false.interaction.trackTool()uses Raindrop's direct HTTP shipper.createSpanProcessor()orgetInstrumentations().Despite that, importing
raindrop-aieagerly resolves Traceloop and instrumentation packages for Anthropic, OpenAI, Bedrock, Vertex AI, Cohere, Pinecone, ChromaDB, Qdrant, and Together.This materially increases installation and CI layer size for consumers that do not use those integrations.
Reproduction
0.2.4-otelv2already declares@traceloop/node-server-sdkas an optional dependency, but omitting optional dependencies makes the base package unloadable:Result:
Size impact
Measured using fresh isolated npm installations on macOS:
node_modulessizeraindrop-ai@0.1.3raindrop-ai@0.2.4raindrop-ai@0.2.4-otelv2raindrop-ai@0.2.4-otelv2 --omit=optionalExact sizes vary by platform, but the dependency difference is substantial.
Suggested behavior
useExternalOtel: trueplusbypassOtelForTools: trueto work without Traceloop installed.--omit=optionaland imports/constructs the direct/external-OTel configuration.If Workshop is not the correct public tracker for the JavaScript SDK, please transfer or point me to the appropriate repository.