Instrumentation SDK
Push usage events from your applications into Doow with the SDK.
Use the Instrumentation SDK when your own application is the best source of a usage event and no provider API already records that event for Doow to read.
When to use this
Use this path when your engineering team owns the place where usage happens.
The application emits structured events to Doow with a dk_ SDK key.
Use the SDK when you need to:
- Meter usage against a customer contract in Doow.
- Send usage that a vendor API does not expose.
- Attribute usage by customer, license, feature, team, model, or environment.
- Prove a custom event flow before connecting broader billing or identity data.
Use provider data when it already exists
If OpenAI, Anthropic, AWS, Azure, Vertex, or another provider already records the usage you need, start with that provider source. Use the SDK when your product owns the usage event or needs attribution the provider does not have.
Choose a method
Pick the method that matches where the event is produced and how much control you have over that runtime.
| Method | Use it when | Setup guide |
|---|---|---|
| Node.js SDK | You can add @doow/track directly to a Node.js service. | Node.js application code |
| Sidecar | The service is not written in Node.js, or telemetry must stay outside the main process. | Container or Kubernetes deployment |
| Serverless | The runtime exits after each invocation and must flush before returning. | Lambda, Vercel, or Azure Functions |
| CLI / Daemon | Events come from scripts, jobs, shell pipelines, or batch workers. | Command line or background daemon |
How it works
- Create an SDK API key from Settings, then API Keys, then SDK Keys in your Doow
workspace. SDK keys start with
dk_. - Install or configure the delivery method that matches your runtime.
- Send one test event with a metric, quantity, and
license_id. - Confirm Doow receives the event and attributes it to the expected license.
- Roll the event into production after batching, retry, shutdown, and credential rotation are covered.
What Doow receives
Each event includes the fields Doow needs to turn application activity into usage reporting:
| Field | Description |
|---|---|
metric | Metric name, such as api_calls, tokens, or storage_gb |
quantity | Numeric usage value |
license_id | Doow license that receives the usage |
unit | Optional unit label, such as tokens or requests |
attribution | Optional metadata for team, model, environment, feature, or service |
Doow receives only the structured metric events you emit. Do not send request payloads, customer content, secrets, or raw application logs as event metadata.
Confirm events arrived
After sending a test event, open the integration detail page from Company Settings, then Integrations. A healthy SDK integration shows the event with the expected metric, quantity, license, and attribution fields.
If no event appears, check the dk_ key, event shape, license_id, and flush
behavior before adding more instrumentation.
Authentication
All SDK events are authenticated with a dk_ API key. Create separate keys for
different environments or delivery methods when you need independent
revocation.
Next steps
Open the setup guide for your runtime: