Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4.49.0 proposal #4848

Draft
wants to merge 40 commits into
base: v4.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d8e6ef5
fix WAF update rules version (#4798)
simon-id Oct 17, 2024
1046dea
[ASM] Ssrf handle request options (#4791)
iunanua Oct 18, 2024
45a7ba2
don't update waf version if it dosn't exist (#4801)
simon-id Oct 18, 2024
b795504
Identify span metrics from OpenTelemetry libraries with 'otel.library…
mcculls Oct 21, 2024
2d9e39a
Fix: esbuild plugin when requiring esm files (#4774)
crysmags Oct 21, 2024
fa10870
Implement Config Consistency (#4725)
khanayan123 Oct 22, 2024
97f997b
[CI] Enable Fastify suite.js (#4771)
watson Oct 22, 2024
debd110
Fix yarn.lock (#4809)
watson Oct 22, 2024
94f4e0c
also audit devDependencies (#4807)
bengl Oct 22, 2024
1b75e23
Update native-appsec to 8.2.1 (#4810)
uurien Oct 22, 2024
cb9e4b7
[DI] Adhere to maxCollectionSize limit in snapshots (#4780)
watson Oct 22, 2024
a6649a4
refactor system tests (#4811)
wconti27 Oct 22, 2024
dcf8ec4
Add Support For Overriding GRPC Error Statuses (#4800)
khanayan123 Oct 22, 2024
c2bc860
add requirements json with native deps and denylist (#4753)
rochdev Oct 22, 2024
b291c46
Add support for Azure App Services tags in profiler (#4803)
szegedi Oct 23, 2024
ef74dd7
[test visibility] Add errors in retried tests in mocha (#4813)
juan-fernandez Oct 23, 2024
2d99c5c
[DI] Guard against invalid probe config and related edge-cases (#4816)
watson Oct 23, 2024
56316e7
Support Node 23 in the profiler (#4815)
szegedi Oct 24, 2024
3b409ac
Protect some lines in text_map.js (#4820)
uurien Oct 24, 2024
228061c
Separating Plugin Tests to Their Own CI Run (#4822)
crysmags Oct 24, 2024
e9db837
Update @datadog/native-iast-taint-tracking (#4824)
uurien Oct 25, 2024
0a067d5
feat(kafkajs): add kafka cluster id to spans and dsm metrics (#4808)
wconti27 Oct 25, 2024
31b2d0f
[DI] Refactor integration tests (#4817)
watson Oct 28, 2024
4b32e39
Profiler shouldn't retry some HTTP requests when sending profiles (#4…
szegedi Oct 28, 2024
dc9d976
[test visibility] Add dynamic instrumentation logs writer for test vi…
juan-fernandez Oct 28, 2024
3dfebfe
Replace manual.keep tag usage with an specific method to keep the tra…
iunanua Oct 29, 2024
c1980cb
Update WAF recommended rules to v1.13.2 (#4834)
CarlesDD Oct 29, 2024
b7b483f
[DI] Adhere to maxFieldCount limit in snapshots (#4829)
watson Oct 29, 2024
1fbb0bc
[ASM] multer instrumentation (#4781)
iunanua Oct 29, 2024
77e4b42
[MLOB-1524] feat(llmobs): Introduce LLM Observability SDK (#4742)
sabrenner Oct 29, 2024
0b93827
[DI] Drop snapshot if JSON payload is too large (#4818)
watson Oct 30, 2024
99ae0b5
Add support for exit spans in Code Origin for Spans (#4772)
watson Oct 30, 2024
4d54b0d
update native metrics to 3.0.1 (#4838)
rochdev Oct 30, 2024
d92eda3
add dsm for google pub sub (#3855)
wconti27 Oct 30, 2024
726a8af
Fix header injection vulnerability detection for access-control-allow…
CarlesDD Oct 30, 2024
cd4183a
Defend against ref being undefined (#4831)
szegedi Oct 30, 2024
b4e5583
[MLOB-1562] feat(llmobs): add openai integration (#4840)
sabrenner Oct 30, 2024
9a1f3d3
upgrade to latest @azure/functions version (#4845)
khanayan123 Oct 30, 2024
9e16a6b
fix(ci): revert typescript 5.0 for docs tests (#4846)
sabrenner Oct 31, 2024
6354c06
v4.49.0
rochdev Oct 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/appsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
express:
runs-on: ubuntu-latest
env:
PLUGINS: express|body-parser|cookie-parser
PLUGINS: express|body-parser|cookie-parser|multer
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/node/setup
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/llmobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: LLMObs

on:
pull_request:
push:
branches: [master]
schedule:
- cron: '0 4 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

jobs:
sdk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/testagent/start
- uses: ./.github/actions/node/setup
- uses: ./.github/actions/install
- uses: ./.github/actions/node/18
- run: yarn test:llmobs:sdk:ci
- uses: ./.github/actions/node/20
- run: yarn test:llmobs:sdk:ci
- uses: ./.github/actions/node/latest
- run: yarn test:llmobs:sdk:ci
- if: always()
uses: ./.github/actions/testagent/logs
- uses: codecov/codecov-action@v3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Code Vulnerability

Workflow depends on a GitHub actions pinned by tag (...read more)

View in Datadog  Leave us feedback  Documentation


openai:
runs-on: ubuntu-latest
env:
PLUGINS: openai
steps:
- uses: actions/checkout@v4

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Code Vulnerability

Workflow depends on a GitHub actions pinned by tag (...read more)

View in Datadog  Leave us feedback  Documentation

- uses: ./.github/actions/testagent/start
- uses: ./.github/actions/node/setup
- uses: ./.github/actions/install
- uses: ./.github/actions/node/oldest
- run: yarn test:llmobs:plugins:ci
shell: bash
- uses: ./.github/actions/node/latest
- run: yarn test:llmobs:plugins:ci
shell: bash
- uses: codecov/codecov-action@v3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Code Vulnerability

Workflow depends on a GitHub actions pinned by tag (...read more)

View in Datadog  Leave us feedback  Documentation

- if: always()
uses: ./.github/actions/testagent/logs
69 changes: 67 additions & 2 deletions .github/workflows/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,14 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/plugins/test

body-parser:
runs-on: ubuntu-latest
env:
PLUGINS: body-parser
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/plugins/test

bunyan:
runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -250,6 +258,14 @@ jobs:
- run: yarn test:plugins:ci
- uses: codecov/codecov-action@v2

cookie-parser:
runs-on: ubuntu-latest
env:
PLUGINS: cookie-parser
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/plugins/test

couchbase:
strategy:
matrix:
Expand Down Expand Up @@ -359,7 +375,22 @@ jobs:
express:
runs-on: ubuntu-latest
env:
PLUGINS: express|body-parser|cookie-parser
PLUGINS: express
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/plugins/test

express-mongo-sanitize:
runs-on: ubuntu-latest
services:
mongodb:
image: circleci/mongo
ports:
- 27017:27017
env:
PLUGINS: express-mongo-sanitize
PACKAGE_NAMES: express-mongo-sanitize
SERVICES: mongo
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/plugins/test
Expand Down Expand Up @@ -542,6 +573,23 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/plugins/test

mariadb:
runs-on: ubuntu-latest
services:
mysql:
image: mariadb:10.4
env:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_DATABASE: 'db'
ports:
- 3306:3306
env:
PLUGINS: mariadb
SERVICES: mariadb
steps:
- uses: actions/checkout@v4

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Code Vulnerability

Workflow depends on a GitHub actions pinned by tag (...read more)

View in Datadog  Leave us feedback  Documentation

- uses: ./.github/actions/plugins/test

memcached:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -636,12 +684,29 @@ jobs:
ports:
- 3306:3306
env:
PLUGINS: mysql|mysql2|mariadb # TODO: move mysql2 to its own job
PLUGINS: mysql
SERVICES: mysql
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/plugins/test

mysql2:
runs-on: ubuntu-latest
services:
mysql:
image: mariadb:10.4
env:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_DATABASE: 'db'
ports:
- 3306:3306
env:
PLUGINS: mysql2
SERVICES: mysql2
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/plugins/test

net:
runs-on: ubuntu-latest
env:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/system-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
uses: DataDog/system-tests/.github/workflows/compute-workflow-parameters.yml@main
with:
library: nodejs
scenarios: CROSSED_TRACING_LIBRARIES
scenarios_groups: essentials

system-tests:
Expand Down
7 changes: 7 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,10 @@ onboarding_tests_installer:
onboarding_tests_k8s_injection:
variables:
WEBLOG_VARIANT: sample-app

requirements_json_test:
rules:
- when: on_success
variables:
REQUIREMENTS_BLOCK_JSON_PATH: ".gitlab/requirements_block.json"
REQUIREMENTS_ALLOW_JSON_PATH: ".gitlab/requirements_allow.json"
2 changes: 2 additions & 0 deletions .gitlab/prepare-oci-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ fi
echo -n $JS_PACKAGE_VERSION > packaging/sources/version

cd packaging

cp ../requirements.json sources/requirements.json
19 changes: 19 additions & 0 deletions .gitlab/requirements_allow.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[
{"name": "min glibc x64", "filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.17"}},
{"name": "ok glibc x64", "filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.23"}},
{"name": "high glibc x64", "filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:3.0"}},
{"name": "musl x64", "filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "musl:1.2.2"}},
{"name": "min glibc arm64", "filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "arm64", "libc": "glibc:2.17"}},
{"name": "ok glibc arm64", "filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "arm64", "libc": "glibc:2.27"}},
{"name": "glibc x86","filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x86", "libc": "glibc:2.19"}},
{"name": "musl arm","filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "arm", "libc": "musl:1.2.2"}},
{"name": "musl arm64", "filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "arm64", "libc": "musl:1.2.2"}},
{"name": "musl x64", "filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "musl:1.2.2"}},
{"name": "musl x86", "filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x86", "libc": "musl:1.2.2"}},
{"name": "windows x64", "filepath": "/some/path", "args": [], "envars": [], "host": {"os": "windows", "arch": "x64"}},
{"name": "windows x86", "filepath": "/some/path", "args": [], "envars": [], "host": {"os": "windows", "arch": "x86"}},
{"name": "macos x64", "filepath": "/some/path", "args": [], "envars": [], "host": {"os": "darwin", "arch": "x64"}},
{"name": "macos arm64", "filepath": "/some/path", "args": [], "envars": [], "host": {"os": "darwin", "arch": "arm64"}},
{"name": "node app", "filepath": "/pathto/node", "args": ["/pathto/node", "./app.js"], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.40"}},
{"name": "ts-node app", "filepath": "/pathto/ts-node", "args": ["/pathto/ts-node", "./app.js"], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.40"}}
]
11 changes: 11 additions & 0 deletions .gitlab/requirements_block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{"name": "unsupported 2.x glibc x64","filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.16"}},
{"name": "unsupported 1.x glibc x64","filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:1.22"}},
{"name": "unsupported 2.x.x glibc x64","filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.16.9"}},
{"name": "unsupported 2.x glibc arm64","filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "arm64", "libc": "glibc:2.16"}},
{"name": "unsupported 2.x.x glibc x64","filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "arm64", "libc": "glibc:2.16.9"}},
{"name": "unsupported 2.x.x glibc x86","filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x86", "libc": "glibc:2.17"}},
{"name": "npm","filepath": "/pathto/node", "args": ["/pathto/node", "/pathto/npm-cli.js"], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.40"}},
{"name": "yarn","filepath": "/pathto/node", "args": ["/pathto/node", "/pathto/yarn.js"], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.40"}},
{"name": "pnpm","filepath": "/pathto/node", "args": ["/pathto/node", "/pathto/pnpm.cjs"], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.40"}}
]
1 change: 1 addition & 0 deletions LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ require,retry,MIT,Copyright 2011 Tim Koschützki Felix Geisendörfer
require,rfdc,MIT,Copyright 2019 David Mark Clements
require,semver,ISC,Copyright Isaac Z. Schlueter and Contributors
require,shell-quote,mit,Copyright (c) 2013 James Halliday
dev,@apollo/server,MIT,Copyright (c) 2016-2020 Apollo Graph, Inc. (Formerly Meteor Development Group, Inc.)
dev,@types/node,MIT,Copyright Authors
dev,autocannon,MIT,Copyright 2016 Matteo Collina
dev,aws-sdk,Apache 2.0,Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ services:
- KAFKA_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
- KAFKA_CONTROLLER_QUORUM_VOTERS=1@127.0.0.1:9093
- KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER
- KAFKA_CLUSTER_ID=r4zt_wrqTRuT7W2NJsB_GA
- CLUSTER_ID=5L6g3nShT-eMCtK--X86sw
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092
- KAFKA_INTER_BROKER_LISTENER_NAME=PLAINTEXT
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
Expand Down
77 changes: 77 additions & 0 deletions docs/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,3 +536,80 @@ const otelTraceId: string = spanContext.traceId
const otelSpanId: string = spanContext.spanId
const otelTraceFlags: number = spanContext.traceFlags
const otelTraceState: opentelemetry.TraceState = spanContext.traceState!

// -- LLM Observability --
const llmobsEnableOptions = {
mlApp: 'mlApp',
agentlessEnabled: true
}
tracer.init({
llmobs: llmobsEnableOptions,
})
const llmobs = tracer.llmobs
const enabled = llmobs.enabled

// manually enable
llmobs.enable({
mlApp: 'mlApp',
agentlessEnabled: true
})

// manually disable
llmobs.disable()

// trace block of code
llmobs.trace({ name: 'name', kind: 'llm' }, () => {})
llmobs.trace({ kind: 'llm', name: 'myLLM', modelName: 'myModel', modelProvider: 'myProvider' }, () => {})
llmobs.trace({ name: 'name', kind: 'llm' }, (span, cb) => {
llmobs.annotate(span, {})
span.setTag('foo', 'bar')
cb(new Error('boom'))
})

// wrap a function
llmobs.wrap({ kind: 'llm' }, function myLLM () {})()
llmobs.wrap({ kind: 'llm', name: 'myLLM', modelName: 'myModel', modelProvider: 'myProvider' }, function myFunction () {})()

// export a span
llmobs.enable({ mlApp: 'myApp' })
llmobs.trace({ kind: 'llm', name: 'myLLM' }, (span) => {
const llmobsSpanCtx = llmobs.exportSpan(span)
llmobsSpanCtx.traceId;
llmobsSpanCtx.spanId;

// submit evaluation
llmobs.disable()
llmobs.submitEvaluation(llmobsSpanCtx, {
label: 'my-eval-metric',
metricType: 'categorical',
value: 'good',
mlApp: 'myApp',
tags: {},
timestampMs: Date.now()
})
})

// annotate a span
llmobs.annotate({
inputData: 'input',
outputData: 'output',
metadata: {},
metrics: {
inputTokens: 10,
outputTokens: 5,
totalTokens: 15
},
tags: {}
})
llmobs.annotate(span, {
inputData: 'input',
outputData: 'output',
metadata: {},
metrics: {},
tags: {}
})



// flush
llmobs.flush()
Loading
Loading