autotel-backends 2.13.15 → 2.14.0
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/README.md +5 -0
- package/dist/datadog.cjs +3 -2
- package/dist/datadog.d.cts +17 -0
- package/dist/datadog.d.ts +17 -0
- package/dist/datadog.js +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -68,6 +68,11 @@ init(
|
|
|
68
68
|
);
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
+
Direct cloud ingestion sends `dd-otlp-source: llmobs` alongside the API key, so
|
|
72
|
+
`gen_ai.*` spans land in Agent Observability with their model, provider, token
|
|
73
|
+
usage, cost and finish reason mapped from the canonical OTel conventions. They
|
|
74
|
+
reach APM either way; pass `llmobs: false` to send only the API key.
|
|
75
|
+
|
|
71
76
|
## Available Backends
|
|
72
77
|
|
|
73
78
|
### 🍯 Honeycomb
|
package/dist/datadog.cjs
CHANGED
|
@@ -38,6 +38,7 @@ let node_module = require("node:module");
|
|
|
38
38
|
* - Direct: https://otlp.{site} → SDK appends /v1/traces, /v1/metrics, /v1/logs
|
|
39
39
|
* - Agent: http://localhost:4318 (default)
|
|
40
40
|
* - Datadog API key authentication headers (direct ingestion only)
|
|
41
|
+
* - Agent Observability routing for GenAI spans (`dd-otlp-source: llmobs`)
|
|
41
42
|
* - Unified service tagging (service, env, version)
|
|
42
43
|
* - Resource attribute best practices
|
|
43
44
|
* - Optional log export configuration
|
|
@@ -74,7 +75,7 @@ let node_module = require("node:module");
|
|
|
74
75
|
* ```
|
|
75
76
|
*/
|
|
76
77
|
function createDatadogConfig(config) {
|
|
77
|
-
const { apiKey, site = "datadoghq.com", service, environment, version, enableLogs = false, useAgent = false, agentHost = "localhost", agentPort = 4318, logRecordProcessors } = config;
|
|
78
|
+
const { apiKey, site = "datadoghq.com", service, environment, version, enableLogs = false, llmobs = true, useAgent = false, agentHost = "localhost", agentPort = 4318, logRecordProcessors } = config;
|
|
78
79
|
if (!useAgent && !apiKey) throw new Error("Datadog API key is required for direct cloud ingestion. Either provide apiKey or set useAgent: true to use local Datadog Agent.");
|
|
79
80
|
const baseConfig = {
|
|
80
81
|
service,
|
|
@@ -100,7 +101,7 @@ function createDatadogConfig(config) {
|
|
|
100
101
|
};
|
|
101
102
|
}
|
|
102
103
|
const otlpEndpoint = `https://otlp.${site}`;
|
|
103
|
-
const authHeaders = `dd-api-key=${apiKey}`;
|
|
104
|
+
const authHeaders = llmobs ? `dd-api-key=${apiKey},dd-otlp-source=llmobs` : `dd-api-key=${apiKey}`;
|
|
104
105
|
const cloudConfig = {
|
|
105
106
|
...baseConfig,
|
|
106
107
|
endpoint: otlpEndpoint,
|
package/dist/datadog.d.cts
CHANGED
|
@@ -91,6 +91,22 @@ interface DatadogPresetConfig {
|
|
|
91
91
|
* @default 4318 (OTLP HTTP)
|
|
92
92
|
*/
|
|
93
93
|
agentPort?: number;
|
|
94
|
+
/**
|
|
95
|
+
* Route GenAI (`gen_ai.*`) spans to Datadog Agent Observability by sending
|
|
96
|
+
* the `dd-otlp-source: llmobs` header alongside the API key.
|
|
97
|
+
*
|
|
98
|
+
* Datadog maps canonical OTel GenAI semantic conventions (v1.37+) onto its
|
|
99
|
+
* native Agent Observability schema — model, provider, token usage, cost,
|
|
100
|
+
* finish reason. Without this header those spans arrive as ordinary APM
|
|
101
|
+
* spans and Agent Observability shows nothing. Traces are written to both
|
|
102
|
+
* products, so a service that is not LLM-shaped loses nothing by sending it.
|
|
103
|
+
*
|
|
104
|
+
* Only applies to direct cloud ingestion; in `useAgent` mode the Agent
|
|
105
|
+
* decides the routing itself.
|
|
106
|
+
*
|
|
107
|
+
* @default true
|
|
108
|
+
*/
|
|
109
|
+
llmobs?: boolean;
|
|
94
110
|
/**
|
|
95
111
|
* Custom log record processors (advanced).
|
|
96
112
|
* Overrides the default log processor if enableLogs is true.
|
|
@@ -105,6 +121,7 @@ interface DatadogPresetConfig {
|
|
|
105
121
|
* - Direct: https://otlp.{site} → SDK appends /v1/traces, /v1/metrics, /v1/logs
|
|
106
122
|
* - Agent: http://localhost:4318 (default)
|
|
107
123
|
* - Datadog API key authentication headers (direct ingestion only)
|
|
124
|
+
* - Agent Observability routing for GenAI spans (`dd-otlp-source: llmobs`)
|
|
108
125
|
* - Unified service tagging (service, env, version)
|
|
109
126
|
* - Resource attribute best practices
|
|
110
127
|
* - Optional log export configuration
|
package/dist/datadog.d.ts
CHANGED
|
@@ -91,6 +91,22 @@ interface DatadogPresetConfig {
|
|
|
91
91
|
* @default 4318 (OTLP HTTP)
|
|
92
92
|
*/
|
|
93
93
|
agentPort?: number;
|
|
94
|
+
/**
|
|
95
|
+
* Route GenAI (`gen_ai.*`) spans to Datadog Agent Observability by sending
|
|
96
|
+
* the `dd-otlp-source: llmobs` header alongside the API key.
|
|
97
|
+
*
|
|
98
|
+
* Datadog maps canonical OTel GenAI semantic conventions (v1.37+) onto its
|
|
99
|
+
* native Agent Observability schema — model, provider, token usage, cost,
|
|
100
|
+
* finish reason. Without this header those spans arrive as ordinary APM
|
|
101
|
+
* spans and Agent Observability shows nothing. Traces are written to both
|
|
102
|
+
* products, so a service that is not LLM-shaped loses nothing by sending it.
|
|
103
|
+
*
|
|
104
|
+
* Only applies to direct cloud ingestion; in `useAgent` mode the Agent
|
|
105
|
+
* decides the routing itself.
|
|
106
|
+
*
|
|
107
|
+
* @default true
|
|
108
|
+
*/
|
|
109
|
+
llmobs?: boolean;
|
|
94
110
|
/**
|
|
95
111
|
* Custom log record processors (advanced).
|
|
96
112
|
* Overrides the default log processor if enableLogs is true.
|
|
@@ -105,6 +121,7 @@ interface DatadogPresetConfig {
|
|
|
105
121
|
* - Direct: https://otlp.{site} → SDK appends /v1/traces, /v1/metrics, /v1/logs
|
|
106
122
|
* - Agent: http://localhost:4318 (default)
|
|
107
123
|
* - Datadog API key authentication headers (direct ingestion only)
|
|
124
|
+
* - Agent Observability routing for GenAI spans (`dd-otlp-source: llmobs`)
|
|
108
125
|
* - Unified service tagging (service, env, version)
|
|
109
126
|
* - Resource attribute best practices
|
|
110
127
|
* - Optional log export configuration
|
package/dist/datadog.js
CHANGED
|
@@ -37,6 +37,7 @@ import { createRequire } from "node:module";
|
|
|
37
37
|
* - Direct: https://otlp.{site} → SDK appends /v1/traces, /v1/metrics, /v1/logs
|
|
38
38
|
* - Agent: http://localhost:4318 (default)
|
|
39
39
|
* - Datadog API key authentication headers (direct ingestion only)
|
|
40
|
+
* - Agent Observability routing for GenAI spans (`dd-otlp-source: llmobs`)
|
|
40
41
|
* - Unified service tagging (service, env, version)
|
|
41
42
|
* - Resource attribute best practices
|
|
42
43
|
* - Optional log export configuration
|
|
@@ -73,7 +74,7 @@ import { createRequire } from "node:module";
|
|
|
73
74
|
* ```
|
|
74
75
|
*/
|
|
75
76
|
function createDatadogConfig(config) {
|
|
76
|
-
const { apiKey, site = "datadoghq.com", service, environment, version, enableLogs = false, useAgent = false, agentHost = "localhost", agentPort = 4318, logRecordProcessors } = config;
|
|
77
|
+
const { apiKey, site = "datadoghq.com", service, environment, version, enableLogs = false, llmobs = true, useAgent = false, agentHost = "localhost", agentPort = 4318, logRecordProcessors } = config;
|
|
77
78
|
if (!useAgent && !apiKey) throw new Error("Datadog API key is required for direct cloud ingestion. Either provide apiKey or set useAgent: true to use local Datadog Agent.");
|
|
78
79
|
const baseConfig = {
|
|
79
80
|
service,
|
|
@@ -99,7 +100,7 @@ function createDatadogConfig(config) {
|
|
|
99
100
|
};
|
|
100
101
|
}
|
|
101
102
|
const otlpEndpoint = `https://otlp.${site}`;
|
|
102
|
-
const authHeaders = `dd-api-key=${apiKey}`;
|
|
103
|
+
const authHeaders = llmobs ? `dd-api-key=${apiKey},dd-otlp-source=llmobs` : `dd-api-key=${apiKey}`;
|
|
103
104
|
const cloudConfig = {
|
|
104
105
|
...baseConfig,
|
|
105
106
|
endpoint: otlpEndpoint,
|