@tangle-network/sdk-telemetry 0.1.8

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/LICENSE ADDED
@@ -0,0 +1,11 @@
1
+ Copyright (c) 2025 Tangle Network
2
+
3
+ All rights reserved.
4
+
5
+ This software and associated documentation files (the "Software") are proprietary
6
+ and confidential. No part of this Software may be reproduced, distributed, or
7
+ transmitted in any form or by any means, including photocopying, recording, or
8
+ other electronic or mechanical methods, without the prior written permission of
9
+ Tangle Network.
10
+
11
+ For licensing inquiries, contact: hello@tangle.tools
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # @tangle-network/sdk-telemetry
2
+
3
+ Usage tracking, credit management, execution-trace collection, and telemetry
4
+ export for the Agent Dev Container SDK.
5
+
6
+ ## LLM call capture
7
+
8
+ Capture LLM calls (model, tokens, latency, prompt/completion) with
9
+ [OpenLLMetry](https://github.com/traceloop/openllmetry), which auto-instruments
10
+ the raw OpenAI/Anthropic SDKs plus 10+ frameworks and emits standard OpenTelemetry
11
+ `gen_ai.*` spans.
12
+
13
+ 1. Instrument your app with OpenLLMetry (`traceloop-sdk` for Python,
14
+ `@traceloop/node-server-sdk` for Node).
15
+ 2. Point its OTLP exporter at our trace ingest:
16
+ `POST /v1/otlp/v1/traces` (the intelligence OTLP/HTTP-JSON adapter).
17
+
18
+ Our ingest reads the standard `gen_ai.*` attribute keys directly off the span
19
+ attribute bag — model from `gen_ai.request.model`, tokens from
20
+ `gen_ai.usage.prompt_tokens` / `gen_ai.usage.completion_tokens` (and the
21
+ `input_tokens` / `output_tokens` spellings). The reader candidate arrays live in
22
+ `packages/sdk-core/src/telemetry/genai-attributes.ts`; the ingest reader is
23
+ `parseGenAiAttribution` (`products/intelligence/api/src/lib/trace-attribution.ts`).
24
+ No bespoke provider wrapper is required.