Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
robertomonteromiguel committed Jan 9, 2025
2 parents e671d0a + b36ce05 commit c5f3c04
Show file tree
Hide file tree
Showing 119 changed files with 5,541 additions and 1,833 deletions.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ body:
validations:
required: false

- type: textarea
attributes:
label: Tracer Config
description: "Please provide the `tracer.init(config)` object and any applicable tracer environment variables"
validations:
required: false

- type: input
attributes:
label: Operating System
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/package-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
- run: yarn
- name: Compute module size tree and report
uses: qard/heaviest-objects-in-the-universe@v1
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ jobs:
range: '>=5.12.1'
aerospike-image: ce-6.4.0.3
test-image: ubuntu-latest
- node-version: 22
range: '>=6.0.0'
aerospike-image: ce-6.4.0.3
test-image: ubuntu-latest
runs-on: ${{ matrix.test-image }}
services:
aerospike:
Expand Down
3 changes: 1 addition & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ stages:
- macrobenchmarks

include:
#TODO: Remove this before merge
- remote: https://gitlab-templates.ddbuild.io/libdatadog/include-wip/robertomonteromiguel/k8s_new_scenarios/one-pipeline.yml
- remote: https://gitlab-templates.ddbuild.io/libdatadog/include/one-pipeline.yml
- local: ".gitlab/benchmarks.yml"
- local: ".gitlab/macrobenchmarks.yml"

Expand Down
28 changes: 11 additions & 17 deletions benchmark/sirun/run-all-variants.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,19 @@ const metaJson = require(path.join(process.cwd(), 'meta.json'))
const env = Object.assign({}, process.env, { DD_TRACE_STARTUP_LOGS: 'false' })

;(async () => {
try {
if (metaJson.variants) {
const variants = metaJson.variants
for (const variant in variants) {
const variantEnv = Object.assign({}, env, { SIRUN_VARIANT: variant })
await exec('sirun', ['meta-temp.json'], { env: variantEnv, stdio: getStdio() })
}
} else {
await exec('sirun', ['meta-temp.json'], { env, stdio: getStdio() })
if (metaJson.variants) {
const variants = metaJson.variants
for (const variant in variants) {
const variantEnv = Object.assign({}, env, { SIRUN_VARIANT: variant })
await exec('sirun', ['meta-temp.json'], { env: variantEnv, stdio: getStdio() })
}
} else {
await exec('sirun', ['meta-temp.json'], { env, stdio: getStdio() })
}

try {
fs.unlinkSync(path.join(process.cwd(), 'meta-temp.json'))
} catch (e) {
// it's ok if we can't delete a temp file
}
try {
fs.unlinkSync(path.join(process.cwd(), 'meta-temp.json'))
} catch (e) {
setImmediate(() => {
throw e // Older Node versions don't fail on uncaught promise rejections.
})
// it's ok if we can't delete a temp file
}
})()
10 changes: 1 addition & 9 deletions benchmark/sirun/run-one-variant.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,4 @@ process.env.DD_INSTRUMENTATION_TELEMETRY_ENABLED = 'false'

const env = Object.assign({}, process.env, { DD_TRACE_STARTUP_LOGS: 'false' })

;(async () => {
try {
await exec('sirun', ['meta-temp.json'], { env, stdio: getStdio() })
} catch (e) {
setImmediate(() => {
throw e // Older Node versions don't fail on uncaught promise rejections.
})
}
})()
exec('sirun', ['meta-temp.json'], { env, stdio: getStdio() })
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "BSD-3-Clause",
"private": true,
"devDependencies": {
"typedoc": "^0.25.8",
"typescript": "^4.6"
"typedoc": "^0.25.13",
"typescript": "^4.9.4"
}
}
2 changes: 2 additions & 0 deletions docs/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ tracer.init({
requestSampling: 50,
maxConcurrentRequests: 4,
maxContextOperations: 30,
dbRowsToTaint: 12,
deduplicationEnabled: true,
redactionEnabled: true,
redactionNamePattern: 'password',
Expand All @@ -147,6 +148,7 @@ tracer.init({
requestSampling: 50,
maxConcurrentRequests: 4,
maxContextOperations: 30,
dbRowsToTaint: 6,
deduplicationEnabled: true,
redactionEnabled: true,
redactionNamePattern: 'password',
Expand Down
22 changes: 11 additions & 11 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ brace-expansion@^2.0.1:
balanced-match "^1.0.0"

jsonc-parser@^3.2.0:
version "3.2.1"
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a"
integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==
version "3.3.1"
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.3.1.tgz#f2a524b4f7fd11e3d791e559977ad60b98b798b4"
integrity sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==

lunr@^2.3.9:
version "2.3.9"
Expand All @@ -35,9 +35,9 @@ marked@^4.3.0:
integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==

minimatch@^9.0.3:
version "9.0.3"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825"
integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==
version "9.0.5"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5"
integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==
dependencies:
brace-expansion "^2.0.1"

Expand All @@ -51,17 +51,17 @@ shiki@^0.14.7:
vscode-oniguruma "^1.7.0"
vscode-textmate "^8.0.0"

typedoc@^0.25.8:
version "0.25.8"
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.25.8.tgz#7d0e1bf12d23bf1c459fd4893c82cb855911ff12"
integrity sha512-mh8oLW66nwmeB9uTa0Bdcjfis+48bAjSH3uqdzSuSawfduROQLlXw//WSNZLYDdhmMVB7YcYZicq6e8T0d271A==
typedoc@^0.25.13:
version "0.25.13"
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.25.13.tgz#9a98819e3b2d155a6d78589b46fa4c03768f0922"
integrity sha512-pQqiwiJ+Z4pigfOnnysObszLiU3mVLWAExSPf+Mu06G/qsc3wzbuM56SZQvONhHLncLUhYzOVkjFFpFfL5AzhQ==
dependencies:
lunr "^2.3.9"
marked "^4.3.0"
minimatch "^9.0.3"
shiki "^0.14.7"

typescript@^4.6:
typescript@^4.9.4:
version "4.9.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
Expand Down
22 changes: 14 additions & 8 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ declare namespace tracer {
*/
maxDepth?: number
}

/**
* Configuration enabling LLM Observability. Enablement is superceded by the DD_LLMOBS_ENABLED environment variable.
*/
Expand Down Expand Up @@ -2203,6 +2203,12 @@ declare namespace tracer {
*/
cookieFilterPattern?: string,

/**
* Defines the number of rows to taint in data coming from databases
* @default 1
*/
dbRowsToTaint?: number,

/**
* Whether to enable vulnerability deduplication
*/
Expand Down Expand Up @@ -2247,7 +2253,7 @@ declare namespace tracer {
* Disable LLM Observability tracing.
*/
disable (): void,

/**
* Instruments a function by automatically creating a span activated on its
* scope.
Expand Down Expand Up @@ -2289,10 +2295,10 @@ declare namespace tracer {
/**
* Decorate a function in a javascript runtime that supports function decorators.
* Note that this is **not** supported in the Node.js runtime, but is in TypeScript.
*
*
* In TypeScript, this decorator is only supported in contexts where general TypeScript
* function decorators are supported.
*
*
* @param options Optional LLM Observability span options.
*/
decorate (options: llmobs.LLMObsNamelessSpanOptions): any
Expand All @@ -2309,7 +2315,7 @@ declare namespace tracer {
/**
* Sets inputs, outputs, tags, metadata, and metrics as provided for a given LLM Observability span.
* Note that with the exception of tags, this method will override any existing values for the provided fields.
*
*
* For example:
* ```javascript
* llmobs.trace({ kind: 'llm', name: 'myLLM', modelName: 'gpt-4o', modelProvider: 'openai' }, () => {
Expand All @@ -2322,7 +2328,7 @@ declare namespace tracer {
* })
* })
* ```
*
*
* @param span The span to annotate (defaults to the current LLM Observability span if not provided)
* @param options An object containing the inputs, outputs, tags, metadata, and metrics to set on the span.
*/
Expand Down Expand Up @@ -2498,14 +2504,14 @@ declare namespace tracer {
* LLM Observability span kind. One of `agent`, `workflow`, `task`, `tool`, `retrieval`, `embedding`, or `llm`.
*/
kind: llmobs.spanKind,

/**
* The ID of the underlying user session. Required for tracking sessions.
*/
sessionId?: string,

/**
* The name of the ML application that the agent is orchestrating.
* The name of the ML application that the agent is orchestrating.
* If not provided, the default value will be set to mlApp provided during initalization, or `DD_LLMOBS_ML_APP`.
*/
mlApp?: string,
Expand Down
Loading

0 comments on commit c5f3c04

Please sign in to comment.