Skip to content

Commit 9ca1cf0

Browse files
authored
Merge branch 'master' into watson/revert2
2 parents 25562fc + 9d0189a commit 9ca1cf0

File tree

36 files changed

+1149
-618
lines changed

36 files changed

+1149
-618
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,21 @@ updates:
1616
gh-actions-packages:
1717
patterns:
1818
- "*"
19+
labels:
20+
- dependabot
21+
- dependencies
22+
- github_actions
23+
- semver-patch
1924
- package-ecosystem: "npm"
2025
directories:
2126
- "/"
2227
schedule:
2328
interval: "weekly"
29+
labels:
30+
- dependabot
31+
- dependencies
32+
- javascript
33+
- semver-patch
2434
ignore:
2535
- dependency-name: "@types/node"
2636
# Update the types manually with new Node.js version support

.github/workflows/system-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,5 @@ jobs:
4242
desired_execution_time: 300 # 5 minutes
4343
scenarios_groups: tracer-release
4444
excluded_scenarios: APM_TRACING_E2E_OTEL,APM_TRACING_E2E_SINGLE_SPAN # require AWS and datadog credentials
45+
parametric_job_count: 8
4546
skip_empty_scenarios: true

.gitlab/benchmarks.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ variables:
2323
paths:
2424
- platform/artifacts/
2525
expire_in: 3 months
26-
variables:
27-
# Gitlab and BP specific env vars. Do not modify.
28-
KUBERNETES_SERVICE_ACCOUNT_OVERWRITE: dd-trace-js
29-
FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: "true"
3026

3127
benchmarks-pr-comment:
3228
stage: benchmarks-pr-comment
@@ -38,9 +34,6 @@ benchmarks-pr-comment:
3834
- cd platform && (git init && git remote add origin https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform && git pull origin dd-trace-js)
3935
- bp-runner bp-runner.pr-comment.yml --debug
4036
allow_failure: true
41-
variables:
42-
# Gitlab and BP specific env vars. Do not modify.
43-
KUBERNETES_SERVICE_ACCOUNT_OVERWRITE: dd-trace-js
4437

4538
check-big-regressions:
4639
stage: benchmarks-pr-comment
@@ -51,9 +44,6 @@ check-big-regressions:
5144
script:
5245
- cd platform && (git init && git remote add origin https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform && git pull origin dd-trace-js)
5346
- bp-runner bp-runner.fail-on-regression.yml --debug
54-
variables:
55-
# Gitlab and BP specific env vars. Do not modify.
56-
KUBERNETES_SERVICE_ACCOUNT_OVERWRITE: dd-trace-js
5747

5848
benchmark:
5949
extends: .benchmarks

.gitlab/macrobenchmarks.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
- platform/artifacts/
2020
expire_in: 3 months
2121
variables:
22-
FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: "true"
23-
2422
K6_OPTIONS_WARMUP_RATE: 500
2523
K6_OPTIONS_WARMUP_DURATION: 1m
2624
K6_OPTIONS_WARMUP_GRACEFUL_STOP: 10s

.gitlab/one-pipeline.locked.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# DO NOT EDIT THIS FILE MANUALLY
22
# This file is auto-generated by automation.
33
include:
4-
- remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/d44e89797a5a47c43cf712193abefe2178a004176606f7e01b77d1ec49a3ef5e/one-pipeline.yml
4+
- remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/a0486057161f85a77e39ad2aa60ac66bb52414696d9b3dd87177df1057b11295/one-pipeline.yml

integration-tests/profiler/profiler.spec.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ if (process.platform !== 'win32') {
2222
const TIMEOUT = 30000
2323

2424
function checkProfiles (agent, proc, timeout,
25-
expectedProfileTypes = DEFAULT_PROFILE_TYPES, expectBadExit = false
25+
expectedProfileTypes = DEFAULT_PROFILE_TYPES, expectBadExit = false, expectSeq = true
2626
) {
2727
return Promise.all([
2828
processExitPromise(proc, timeout, expectBadExit),
29-
expectProfileMessagePromise(agent, timeout, expectedProfileTypes)
29+
expectProfileMessagePromise(agent, timeout, expectedProfileTypes, expectSeq)
3030
])
3131
}
3232

3333
function expectProfileMessagePromise (agent, timeout,
34-
expectedProfileTypes = DEFAULT_PROFILE_TYPES
34+
expectedProfileTypes = DEFAULT_PROFILE_TYPES, expectSeq = true
3535
) {
3636
const fileNames = expectedProfileTypes.map(type => `${type}.pprof`)
3737
return agent.assertMessageReceived(({ headers, _, files }) => {
@@ -50,6 +50,9 @@ function expectProfileMessagePromise (agent, timeout,
5050
for (const [index, fileName] of attachments.entries()) {
5151
assert.propertyVal(files[index + 1], 'originalname', fileName)
5252
}
53+
if (expectSeq) {
54+
assert(event.tags_profiler.indexOf(',profile_seq:') !== -1)
55+
}
5356
} catch (e) {
5457
e.message += ` ${JSON.stringify({ headers, files, event })}`
5558
throw e
@@ -560,7 +563,7 @@ describe('profiler', () => {
560563
execArgv: oomExecArgv,
561564
env: oomEnv
562565
})
563-
return checkProfiles(agent, proc, timeout, ['space'], true)
566+
return checkProfiles(agent, proc, timeout, ['space'], true, false)
564567
})
565568

566569
it('sends a heap profile on OOM in worker thread and exits successfully', () => {
@@ -584,7 +587,7 @@ describe('profiler', () => {
584587
DD_PROFILING_EXPERIMENTAL_OOM_MAX_HEAP_EXTENSION_COUNT: 3
585588
}
586589
})
587-
return checkProfiles(agent, proc, timeout, ['space'], false)
590+
return checkProfiles(agent, proc, timeout, ['space'], false, false)
588591
}).retries(3)
589592

590593
it('sends a heap profile on OOM with async callback', () => {

packages/dd-trace/test/remote_config/rc-client_id.spec.js renamed to integration-tests/remote_config.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const { createSandbox, FakeAgent, spawnProc } = require('../../../../integration-tests/helpers')
3+
const { createSandbox, FakeAgent, spawnProc } = require('./helpers')
44
const path = require('path')
55
const Axios = require('axios')
66
const { assert } = require('chai')
@@ -14,11 +14,11 @@ describe('Remote config client id', () => {
1414
sandbox = await createSandbox(
1515
['express'],
1616
false,
17-
[path.join(__dirname, 'resources')]
17+
[path.join(__dirname, 'remote_config')]
1818
)
1919

2020
cwd = sandbox.folder
21-
appFile = path.join(cwd, 'resources', 'index.js')
21+
appFile = path.join(cwd, 'remote_config', 'index.js')
2222
})
2323

2424
after(async function () {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"test:debugger": "mocha -r 'packages/dd-trace/test/setup/mocha.js' 'packages/dd-trace/test/debugger/**/*.spec.js'",
2626
"test:debugger:ci": "nyc --no-clean --include 'packages/dd-trace/src/debugger/**/*.js' -- npm run test:debugger",
2727
"test:eslint-rules": "node eslint-rules/*.test.mjs",
28-
"test:trace:core": "tap packages/dd-trace/test/*.spec.js \"packages/dd-trace/test/{ci-visibility,datastreams,encode,exporters,opentelemetry,opentracing,plugins,service-naming,standalone,telemetry}/**/*.spec.js\"",
28+
"test:trace:core": "tap packages/dd-trace/test/*.spec.js \"packages/dd-trace/test/{ci-visibility,datastreams,encode,exporters,opentelemetry,opentracing,plugins,remote_config,service-naming,standalone,telemetry}/**/*.spec.js\"",
2929
"test:trace:core:ci": "npm run test:trace:core -- --coverage --nyc-arg=--include=\"packages/dd-trace/src/**/*.js\"",
3030
"test:trace:guardrails": "mocha -r \"packages/dd-trace/test/setup/mocha.js\" \"packages/dd-trace/test/guardrails/**/*.spec.js\"",
3131
"test:trace:guardrails:ci": "nyc --no-clean --include \"packages/dd-trace/src/guardrails/**/*.js\" -- npm run test:trace:guardrails",

packages/datadog-instrumentations/src/langchain.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,27 @@ for (const extension of extensions) {
5353
return exports
5454
})
5555

56+
addHook({ name: '@langchain/core', file: `dist/tools/index.${extension}`, versions: ['>=0.1'] }, exports => {
57+
if (extension === 'cjs') {
58+
wrap(exports.StructuredTool.prototype, 'invoke', 'orchestrion:@langchain/core:Tool_invoke')
59+
}
60+
return exports
61+
})
62+
63+
addHook({ name: '@langchain/core', file: `dist/vectorstores.${extension}`, versions: ['>=0.1'] }, exports => {
64+
if (extension === 'cjs') {
65+
wrap(
66+
exports.VectorStore.prototype, 'similaritySearch', 'orchestrion:@langchain/core:VectorStore_similaritySearch'
67+
)
68+
wrap(
69+
exports.VectorStore.prototype, 'similaritySearchWithScore',
70+
'orchestrion:@langchain/core:VectorStore_similaritySearchWithScore'
71+
)
72+
}
73+
74+
return exports
75+
})
76+
5677
addHook({ name: '@langchain/core', file: `dist/embeddings.${extension}`, versions: ['>=0.1'] }, exports => {
5778
if (extension === 'cjs') {
5879
shimmer.wrap(exports, 'Embeddings', Embeddings => {

0 commit comments

Comments
 (0)