Skip to content

Commit

Permalink
Merge branch 'elastic:main' into review/captureStackTrace
Browse files Browse the repository at this point in the history
  • Loading branch information
cjr125 authored Jan 13, 2025
2 parents ac5d62f + 65ebcab commit 514b710
Show file tree
Hide file tree
Showing 27 changed files with 130 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .ci/scripts/benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ NODEJS_VERSION=14

USER_ID="${USER_ID}" \
NODEJS_VERSION="${NODEJS_VERSION}" \
docker compose -f ./dev-utils/docker-compose.yml down \
docker-compose -f ./dev-utils/docker-compose.yml down \
--remove-orphans \
--volumes || true

USER_ID="${USER_ID}" \
NODEJS_VERSION="${NODEJS_VERSION}" \
docker compose -f ./dev-utils/docker-compose.yml up \
docker-compose -f ./dev-utils/docker-compose.yml up \
--build \
--abort-on-container-exit \
--exit-code-from node-benchmark \
Expand Down
4 changes: 2 additions & 2 deletions .ci/scripts/load-testing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ NODEJS_VERSION=14
USER_ID="${USER_ID}" \
NODEJS_VERSION="${NODEJS_VERSION}" \
STACK_VERSION=${STACK_VERSION} \
docker compose -f ./dev-utils/docker-compose.yml down \
docker-compose -f ./dev-utils/docker-compose.yml down \
--remove-orphans \
--volumes || true

USER_ID="${USER_ID}" \
NODEJS_VERSION="${NODEJS_VERSION}" \
STACK_VERSION=${STACK_VERSION} \
docker compose -f ./dev-utils/docker-compose.yml up \
docker-compose -f ./dev-utils/docker-compose.yml up \
--build \
--exit-code-from load-testing \
load-testing
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
matrix:
stack-version:
- '8.0.0-SNAPSHOT'
- '8.15.5'
- '8.16.2'
scope:
- '@elastic/apm-rum'
- '@elastic/apm-rum-core'
Expand Down Expand Up @@ -125,4 +125,4 @@ jobs:
uses: ./.github/workflows/run-test
with:
goal: 'coverage'
stack-version: '8.15.5'
stack-version: '8.16.2'
4 changes: 2 additions & 2 deletions .github/workflows/microbenchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
inputs:
stack_version:
description: 'Stack Version'
default: '8.15.5'
default: '8.16.2'
required: false
push:
branches:
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Run buildkite pipeline
uses: elastic/oblt-actions/buildkite/run@v1
env:
STACK_VERSION: ${{ inputs.stack_version || '8.15.5' }}
STACK_VERSION: ${{ inputs.stack_version || '8.16.2' }}
with:
token: ${{ secrets.BUILDKITE_TOKEN }}
pipeline: apm-agent-microbenchmark
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ jobs:
with:
github-token: ${{ steps.get_token.outputs.token }}

# Temporary fix for "ValueError: invalid mode: 'rU' while trying to load binding.gyp"
# See https://github.com/nodejs/node-gyp/issues/2219
# This can be removed when "node-gyp" is updated
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ jobs:
- name: Publish the release
env:
DRY_RUN: "${{ inputs.dry-run }}"
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
npm run ci:release
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"registry": "https://registry.npmjs.org",
"command": {
"version": {
"allowBranch": ["main", "4.x", "release", "release/*"],
"allowBranch": ["main", "4.x", "release", "prerelease/*"],
"conventionalCommits": true,
"message": "chore(release): publish",
"changelogPreset": "conventionalcommits",
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions packages/rum-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

### [3.0.6](https://github.com/elastic/apm-agent-rum-js/compare/@elastic/[email protected]...@elastic/[email protected]) (2025-01-10)

**Note:** Version bump only for package @elastic/apm-rum-angular





### [3.0.5](https://github.com/elastic/apm-agent-rum-js/compare/@elastic/[email protected]...@elastic/[email protected]) (2025-01-09)

**Note:** Version bump only for package @elastic/apm-rum-angular





### [3.0.4](https://github.com/elastic/apm-agent-rum-js/compare/@elastic/[email protected]...@elastic/[email protected]) (2024-06-27)

**Note:** Version bump only for package @elastic/apm-rum-angular
Expand Down
2 changes: 1 addition & 1 deletion packages/rum-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elastic/apm-rum-angular",
"version": "3.0.4",
"version": "3.0.6",
"description": "Elastic APM Real User Monitoring for Angular applications",
"homepage": "https://www.elastic.co/guide/en/apm/agent/rum-js/current/index.html",
"license": "MIT",
Expand Down
18 changes: 18 additions & 0 deletions packages/rum-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

### [5.22.1](https://github.com/elastic/apm-agent-rum-js/compare/@elastic/[email protected]...@elastic/[email protected]) (2025-01-10)


### Bug Fixes

* **rum-core:** fix for `merge` utility function ([#1555](https://github.com/elastic/apm-agent-rum-js/issues/1555)) ([0d1eda5](https://github.com/elastic/apm-agent-rum-js/commit/0d1eda5b90e2930806e8d1cb733454bd8db12e89))



## [5.22.0](https://github.com/elastic/apm-agent-rum-js/compare/@elastic/[email protected]...@elastic/[email protected]) (2025-01-09)


### Features

* add pageLoadParentId configuration ([#1521](https://github.com/elastic/apm-agent-rum-js/issues/1521)) ([25143ab](https://github.com/elastic/apm-agent-rum-js/commit/25143ab2c0a057cc1f6510fcced0a739c5cce792))



### [5.21.1](https://github.com/elastic/apm-agent-rum-js/compare/@elastic/[email protected]...@elastic/[email protected]) (2024-06-27)


Expand Down
2 changes: 1 addition & 1 deletion packages/rum-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elastic/apm-rum-core",
"version": "5.21.1",
"version": "5.22.1",
"description": "Elastic apm core",
"license": "MIT",
"main": "dist/lib/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/rum-core/src/common/config-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class Config {
Math.round(transactionSampleRate * 10000) / 10000
}

merge(this.config, properties)
this.config = merge(this.config, properties)
this.events.send(CONFIG_CHANGE, [this.config])
}

Expand Down
8 changes: 4 additions & 4 deletions packages/rum-core/src/common/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,12 @@ function getCurrentScript() {
}
}

function extend(dst) {
return baseExtend(dst, slice.call(arguments, 1), false)
function extend() {
return baseExtend(Object.create(null), slice.call(arguments), false)
}

function merge(dst) {
return baseExtend(dst, slice.call(arguments, 1), true)
function merge() {
return baseExtend(Object.create(null), slice.call(arguments), true)
}

function isUndefined(obj) {
Expand Down
2 changes: 1 addition & 1 deletion packages/rum-core/src/performance-monitoring/span-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class SpanBase {
addContext(...context) {
if (context.length === 0) return
this.ensureContext()
merge(this.context, ...context)
this.context = merge(this.context, ...context)
}

end(endTime) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class Transaction extends SpanBase {
// is not setting explicitly the threshold and instead expecting to rely on the one by default.
this.options.reuseThreshold = options.reuseThreshold

extend(this.options, options)
this.options = extend(this.options, options)
}
}

Expand Down
1 change: 1 addition & 0 deletions packages/rum-core/test/common/xhr-patch.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ describe('xhrPatch', function () {
const req = new window.XMLHttpRequest()
const getEvents = registerEventListener(req)
req.open('GET', 'https://elastic.co/guide', true)
req.timeout = 1
req.addEventListener('loadend', () => {
expect(getEvents(done).map(e => e.event)).toEqual(['schedule', 'invoke'])
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,13 @@ describe('PerformanceMonitoring', function () {

it('should notify when a transaction has been filtered out', function () {
spyOn(configService, 'dispatchEvent')
var tr = new Transaction('transaction-no-duration', 'transaction-type')
tr.end()
// NOTE: tests in SauceLabs fail because the duration becomes 1. Setting the start & end
// times will ensure `duration` is 0.
var now = Date.now()
var tr = new Transaction('transaction-no-duration', 'transaction-type', {
startTime: now
})
tr.end(now)

var payload = performanceMonitoring.createTransactionPayload(tr)
expect(payload).toBeUndefined()
Expand Down
16 changes: 16 additions & 0 deletions packages/rum-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

### [2.0.5](https://github.com/elastic/apm-agent-rum-js/compare/@elastic/[email protected]...@elastic/[email protected]) (2025-01-10)

**Note:** Version bump only for package @elastic/apm-rum-react





### [2.0.4](https://github.com/elastic/apm-agent-rum-js/compare/@elastic/[email protected]...@elastic/[email protected]) (2025-01-09)

**Note:** Version bump only for package @elastic/apm-rum-react





### [2.0.3](https://github.com/elastic/apm-agent-rum-js/compare/@elastic/[email protected]...@elastic/[email protected]) (2024-06-27)

**Note:** Version bump only for package @elastic/apm-rum-react
Expand Down
2 changes: 1 addition & 1 deletion packages/rum-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elastic/apm-rum-react",
"version": "2.0.3",
"version": "2.0.5",
"description": "Elastic APM Real User Monitoring for React applications",
"author": "Hamid <[email protected]>",
"homepage": "https://www.elastic.co/guide/en/apm/agent/rum-js/current/index.html",
Expand Down
16 changes: 16 additions & 0 deletions packages/rum-vue/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

### [2.1.9](https://github.com/elastic/apm-agent-rum-js/compare/@elastic/[email protected]...@elastic/[email protected]) (2025-01-10)

**Note:** Version bump only for package @elastic/apm-rum-vue





### [2.1.8](https://github.com/elastic/apm-agent-rum-js/compare/@elastic/[email protected]...@elastic/[email protected]) (2025-01-09)

**Note:** Version bump only for package @elastic/apm-rum-vue





### [2.1.7](https://github.com/elastic/apm-agent-rum-js/compare/@elastic/[email protected]...@elastic/[email protected]) (2024-06-27)

**Note:** Version bump only for package @elastic/apm-rum-vue
Expand Down
2 changes: 1 addition & 1 deletion packages/rum-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elastic/apm-rum-vue",
"version": "2.1.7",
"version": "2.1.9",
"description": "Elastic APM Real User Monitoring for Vue applications",
"keywords": [
"elastic",
Expand Down
16 changes: 16 additions & 0 deletions packages/rum/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

### [5.16.3](https://github.com/elastic/apm-agent-rum-js/compare/@elastic/[email protected]...@elastic/[email protected]) (2025-01-10)

**Note:** Version bump only for package @elastic/apm-rum





### [5.16.2](https://github.com/elastic/apm-agent-rum-js/compare/@elastic/[email protected]...@elastic/[email protected]) (2025-01-09)

**Note:** Version bump only for package @elastic/apm-rum





### [5.16.1](https://github.com/elastic/apm-agent-rum-js/compare/@elastic/[email protected]...@elastic/[email protected]) (2024-06-27)

**Note:** Version bump only for package @elastic/apm-rum
Expand Down
2 changes: 1 addition & 1 deletion packages/rum/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elastic/apm-rum",
"version": "5.16.1",
"version": "5.16.3",
"description": "Elastic APM JavaScript agent",
"main": "dist/lib/index.js",
"module": "dist/es/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/rum/src/apm-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default class ApmBase {
/**
* Set Agent version to be sent as part of metadata to the APM Server
*/
configService.setVersion('5.16.1')
configService.setVersion('5.16.3')
this.config(config)
/**
* Set level here to account for both active and inactive cases
Expand Down
Loading

0 comments on commit 514b710

Please sign in to comment.