Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/chainguard/dependabot-automation.sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ subject: repo:DataDog/dd-trace-js:pull_request

claim_pattern:
event_name: pull_request_target
ref: refs/heads/master
ref: refs/heads/main
ref_protected: "true"
job_workflow_ref: DataDog/dd-trace-js/.github/workflows/dependabot-automation.yml@refs/heads/master
job_workflow_ref: DataDog/dd-trace-js/.github/workflows/dependabot-automation.yml@refs/heads/main

permissions:
contents: write
Expand Down
6 changes: 3 additions & 3 deletions .github/chainguard/release-proposal.sts.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
issuer: https://token.actions.githubusercontent.com

subject: repo:DataDog/dd-trace-js:ref:refs/heads/master
subject: repo:DataDog/dd-trace-js:ref:refs/heads/main

claim_pattern:
event_name: (workflow_dispatch|schedule)
ref: refs/heads/master
ref: refs/heads/main
ref_protected: "true"
job_workflow_ref: DataDog/dd-trace-js/.github/workflows/release-proposal.yml@refs/heads/master
job_workflow_ref: DataDog/dd-trace-js/.github/workflows/release-proposal.yml@refs/heads/main

permissions:
contents: write
Expand Down
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
- [ ] API [documentation][3].
- [ ] CI [jobs/workflows][4].

[1]: https://github.com/DataDog/dd-trace-js/blob/master/index.d.ts
[2]: https://github.com/DataDog/dd-trace-js/blob/master/docs/test.ts
[1]: https://github.com/DataDog/dd-trace-js/blob/main/index.d.ts
[2]: https://github.com/DataDog/dd-trace-js/blob/main/docs/test.ts
[3]: https://github.com/DataDog/documentation/blob/master/content/en/tracing/trace_collection/library_config/nodejs.md
[4]: https://github.com/DataDog/dd-trace-js/blob/master/.github/workflows/plugins.yml
[4]: https://github.com/DataDog/dd-trace-js/blob/main/.github/workflows/plugins.yml

### Additional Notes
<!-- Anything else we should know when reviewing? -->
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/aiguard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: AI Guard
on:
pull_request:
push:
branches: [master]
branches: [main]
schedule:
- cron: 0 4 * * *

Expand All @@ -12,7 +12,7 @@ concurrency:
cancel-in-progress: true

env:
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/main' && '--retries 1' || '' }}

jobs:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/all-green.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
push:
branches:
- master
- main
schedule:
- cron: 0 4 * * *

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/apm-capabilities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: APM Capabilities
on:
pull_request:
push:
branches: [master]
branches: [main]
schedule:
- cron: 0 4 * * *
workflow_dispatch:
Expand All @@ -19,7 +19,7 @@ concurrency:
cancel-in-progress: true

env:
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/main' && '--retries 1' || '' }}
LATEST_VERSION: ${{ inputs.latest-version }}

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/apm-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: APM Integrations
on:
pull_request:
push:
branches: [master]
branches: [main]
schedule:
- cron: 0 4 * * *
workflow_dispatch:
Expand All @@ -19,7 +19,7 @@ concurrency:
cancel-in-progress: true

env:
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/main' && '--retries 1' || '' }}
LATEST_VERSION: ${{ inputs.latest-version }}

# TODO: upstream jobs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/appsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: AppSec
on:
pull_request:
push:
branches: [master]
branches: [main]
schedule:
- cron: 0 4 * * *
workflow_dispatch:
Expand All @@ -18,7 +18,7 @@ concurrency:
cancel-in-progress: true

env:
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/main' && '--retries 1' || '' }}
LATEST_VERSION: ${{ inputs.latest-version }}

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ master]
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [ main ]

jobs:
analyze:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/debugger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Debugger
on:
pull_request:
push:
branches: [master]
branches: [main]
schedule:
- cron: 0 4 * * *

Expand All @@ -12,7 +12,7 @@ concurrency:
cancel-in-progress: true

env:
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/main' && '--retries 1' || '' }}

jobs:
ubuntu:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/eslint-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
paths:
- 'eslint-rules/**'
push:
branches: [master]
branches: [main]
paths:
- 'eslint-rules/**'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/llmobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: LLMObs
on:
pull_request:
push:
branches: [master]
branches: [main]
schedule:
- cron: 0 4 * * *
workflow_dispatch:
Expand All @@ -18,7 +18,7 @@ concurrency:
cancel-in-progress: true

env:
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/main' && '--retries 1' || '' }}
LATEST_VERSION: ${{ inputs.latest-version }}

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Platform
on:
pull_request:
push:
branches: [master]
branches: [main]
schedule:
- cron: 0 4 * * *
workflow_dispatch:
Expand All @@ -18,7 +18,7 @@ concurrency:
cancel-in-progress: true

env:
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/main' && '--retries 1' || '' }}
LATEST_VERSION: ${{ inputs.latest-version }}

# TODO: upstream jobs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request_target:
types: [opened, labeled, unlabeled, synchronize]
branches:
- 'master'
- 'main'
jobs:
label:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/profiling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Profiling
on:
pull_request:
push:
branches: [master]
branches: [main]
schedule:
- cron: 0 4 * * *
workflow_dispatch:
Expand All @@ -18,7 +18,7 @@ concurrency:
cancel-in-progress: true

env:
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/main' && '--retries 1' || '' }}
LATEST_VERSION: ${{ inputs.latest-version }}

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Project
on:
pull_request:
push:
branches: [master]
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/retry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_run:
branches:
- dependabot/**
- master
- main
- v[0-9]+.[0-9]+.[0-9]+-proposal
- v[0-9]+.x
types:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Serverless
on:
pull_request:
push:
branches: [master]
branches: [main]
schedule:
- cron: 0 4 * * *
workflow_dispatch:
Expand All @@ -19,7 +19,7 @@ concurrency:
cancel-in-progress: true

env:
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/main' && '--retries 1' || '' }}
LATEST_VERSION: ${{ inputs.latest-version }}


Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/system-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: System Tests
on:
pull_request:
push:
branches: [master]
branches: [main]
workflow_dispatch:
schedule:
- cron: 0 4 * * *

concurrency:
# this ensures that only one workflow runs at a time for a given branch on pull requests
# as the group key is the workflow name and the branch name
# for scheduled runs and pushes to master, we use the run id to ensure that all runs are executed
# for scheduled runs and pushes to main, we use the run id to ensure that all runs are executed
group: ${{ (github.event_name == 'pull_request' && format('{0}-{1}', github.workflow, github.ref)) || format('{0}-{1}', github.workflow, github.run_id) }}
cancel-in-progress: true

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-optimization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- master
- main
schedule:
- cron: 0 4 * * *

Expand All @@ -13,7 +13,7 @@ concurrency:
cancel-in-progress: true

env:
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/main' && '--retries 1' || '' }}

jobs:
benchmarks-e2e:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# `dd-trace`: Node.js APM Tracer Library

[![npm v5](https://img.shields.io/npm/v/dd-trace/latest?color=blue&label=dd-trace%40v5&logo=npm)](https://www.npmjs.com/package/dd-trace)
[![codecov](https://codecov.io/gh/DataDog/dd-trace-js/branch/master/graph/badge.svg)](https://codecov.io/gh/DataDog/dd-trace-js)
[![codecov](https://codecov.io/gh/DataDog/dd-trace-js/branch/main/graph/badge.svg)](https://codecov.io/gh/DataDog/dd-trace-js)

<img align="right" src="https://user-images.githubusercontent.com/551402/208212084-1d0c07e2-4135-4c61-b2da-8f2fddbc66ed.png" alt="Bits the dog JavaScript" width="200px"/>

Expand Down Expand Up @@ -66,7 +66,7 @@ Changes associated with each individual release are documented on the [GitHub Re

## Development and Contribution

Please read the [CONTRIBUTING.md](https://github.com/DataDog/dd-trace-js/blob/master/CONTRIBUTING.md) document before contributing to this open source project.
Please read the [CONTRIBUTING.md](https://github.com/DataDog/dd-trace-js/blob/main/CONTRIBUTING.md) document before contributing to this open source project.


## ECMAScript Modules (ESM) Support
Expand All @@ -91,7 +91,7 @@ If you would like to trace your bundled application then please read this page o

## Security Vulnerabilities

Please refer to the [SECURITY.md](https://github.com/DataDog/dd-trace-js/blob/master/SECURITY.md) document if you have found a security issue.
Please refer to the [SECURITY.md](https://github.com/DataDog/dd-trace-js/blob/main/SECURITY.md) document if you have found a security issue.


## Datadog With OpenTelemetery
Expand Down
2 changes: 1 addition & 1 deletion benchmark/sirun/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The version of this file in master is used across all PRs regardless of upstream branch
# The version of this file in main is used across all PRs regardless of upstream branch
FROM --platform=linux/amd64 ubuntu:22.04

RUN apt-get update && apt-get install --no-install-recommends -y \
Expand Down
10 changes: 5 additions & 5 deletions benchmark/sirun/diff-recent.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function getReadmes () {
return readmes
}

function diff (beforeSummary, afterSummary, prev = 'master', curr = 'this commit') {
function diff (beforeSummary, afterSummary, prev = 'main', curr = 'this commit') {
const diffTree = walk(afterSummary, beforeSummary)
const html = fs.readFileSync(path.join(__dirname, 'diff.html'), 'utf8')
.replace('REPLACE_ME_DIFF_DATA', JSON.stringify(diffTree, null, 2))
Expand All @@ -56,27 +56,27 @@ function latestVersionResults (jsonStr) {
}

const main = async () => {
const prev = execSync('git rev-parse master').toString().trim()
const prev = execSync('git rev-parse main').toString().trim()
const builds = await getBuildNumsFromGithub(prev)
const buildId = Object.keys(builds).find(n => n.includes('sirun-all'))
if (!buildId) {
console.error('No `sirun-all` build found on master.')
console.error('No `sirun-all` build found on main.')
return
}
const build = builds[buildId]

const artifacts = JSON.parse(await get(artifactsUrl(build), circleHeaders))
const artifact = artifacts.find(a => a.path.endsWith('summary.json'))
if (!artifact) {
console.error('summary.json artifact not found on master')
console.error('summary.json artifact not found on main')
console.error('artifacts', JSON.stringify(artifacts, null, 2))
return
}
const prevSummary = latestVersionResults(await get(artifact.url, circleHeaders))
const currentSummary = latestVersionResults(fs.readFileSync('/tmp/artifacts/summary.json'))

const thisCommit = execSync('git rev-parse HEAD').toString().trim()
const { diffTree, html } = diff(prevSummary, currentSummary, 'master', thisCommit)
const { diffTree, html } = diff(prevSummary, currentSummary, 'main', thisCommit)

console.log(JSON.stringify(diffTree, null, 2))

Expand Down
2 changes: 1 addition & 1 deletion benchmark/sirun/runall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function cleanup {

trap cleanup EXIT

# Temporary until merged to master
# Temporary until merged to main
wget -O sirun.tar.gz https://github.com/DataDog/sirun/releases/download/v0.1.10/sirun-v0.1.10-x86_64-unknown-linux-musl.tar.gz \
&& tar -xzf sirun.tar.gz \
&& rm sirun.tar.gz \
Expand Down
3 changes: 1 addition & 2 deletions integration-tests/cucumber/cucumber.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2677,8 +2677,7 @@ versions.forEach(version => {
})

after(() => {
// We can't use main here because in CI it might be "master".
// We just use `-` which goes back to the previous branch
// Go back to previous branch.
execSync('git checkout -', { cwd, stdio: 'ignore' })
execSync('git branch -D feature-branch', { cwd, stdio: 'ignore' })
})
Expand Down
Loading