Skip to content

Commit

Permalink
Merge branch 'master' into juan-fernandez/add-vitest-support
Browse files Browse the repository at this point in the history
  • Loading branch information
juan-fernandez committed Jun 24, 2024
2 parents 482db61 + f29f416 commit cb580df
Show file tree
Hide file tree
Showing 13 changed files with 818 additions and 869 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/datadog-static-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Datadog Static Analysis

on:
pull_request:
push:
branches: [master]

jobs:
static-analysis:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"test:integration:cypress": "mocha --colors --timeout 30000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/cypress/*.spec.js\"",
"test:integration:playwright": "mocha --colors --timeout 30000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/playwright/*.spec.js\"",
"test:integration:selenium": "mocha --colors --timeout 30000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/selenium/*.spec.js\"",
"test:integration:profiler": "mocha --colors --timeout 90000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/profiler/*.spec.js\"",
"test:integration:profiler": "mocha --colors --timeout 180000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/profiler/*.spec.js\"",
"test:integration:serverless": "mocha --colors --timeout 30000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/serverless/*.spec.js\"",
"test:integration:vitest": "mocha --colors --timeout 30000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/vitest/*.spec.js\"",
"test:integration:plugins": "mocha --colors --exit -r \"packages/dd-trace/test/setup/mocha.js\" \"packages/datadog-plugin-@($(echo $PLUGINS))/test/integration-test/**/*.spec.js\"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('esm', () => {

withVersions('aws-sdk', ['aws-sdk'], version => {
before(async function () {
this.timeout(20000)
this.timeout(60000)
sandbox = await createSandbox([`'aws-sdk@${version}'`], false, [
'./packages/datadog-plugin-aws-sdk/test/integration-test/*'])
})
Expand Down
2 changes: 1 addition & 1 deletion packages/datadog-plugin-child_process/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ChildProcessPlugin extends TracingPlugin {
}

this.startSpan('command_execution', {
service: this.config.service,
service: this.config.service || this._tracerConfig.service,
resource: (shell === true) ? 'sh' : cmdFields[0],
type: 'system',
meta
Expand Down
16 changes: 10 additions & 6 deletions packages/datadog-plugin-child_process/test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ describe('Child process plugin', () => {
tracerStub = {
startSpan: sinon.stub()
}

configStub = {
service: 'test-service'
}
})

afterEach(() => {
Expand All @@ -52,7 +56,7 @@ describe('Child process plugin', () => {
childOf: undefined,
tags: {
component: 'subprocess',
'service.name': undefined,
'service.name': 'test-service',
'resource.name': 'ls',
'span.kind': undefined,
'span.type': 'system',
Expand All @@ -74,7 +78,7 @@ describe('Child process plugin', () => {
childOf: undefined,
tags: {
component: 'subprocess',
'service.name': undefined,
'service.name': 'test-service',
'resource.name': 'sh',
'span.kind': undefined,
'span.type': 'system',
Expand All @@ -98,7 +102,7 @@ describe('Child process plugin', () => {
childOf: undefined,
tags: {
component: 'subprocess',
'service.name': undefined,
'service.name': 'test-service',
'resource.name': 'echo',
'span.kind': undefined,
'span.type': 'system',
Expand All @@ -123,7 +127,7 @@ describe('Child process plugin', () => {
childOf: undefined,
tags: {
component: 'subprocess',
'service.name': undefined,
'service.name': 'test-service',
'resource.name': 'sh',
'span.kind': undefined,
'span.type': 'system',
Expand All @@ -149,7 +153,7 @@ describe('Child process plugin', () => {
childOf: undefined,
tags: {
component: 'subprocess',
'service.name': undefined,
'service.name': 'test-service',
'resource.name': 'ls',
'span.kind': undefined,
'span.type': 'system',
Expand All @@ -175,7 +179,7 @@ describe('Child process plugin', () => {
childOf: undefined,
tags: {
component: 'subprocess',
'service.name': undefined,
'service.name': 'test-service',
'resource.name': 'sh',
'span.kind': undefined,
'span.type': 'system',
Expand Down
Loading

0 comments on commit cb580df

Please sign in to comment.