Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0f6ef9a
ci(v8): Ensure CI runs on v8 & v9 branches (#14604) (#14727)
mydea Dec 16, 2024
323a38c
meta(changelog): Update changelog for 8.45.1 (#14722)
andreiborza Dec 16, 2024
3690d62
release: 8.45.1
getsentry-bot Dec 16, 2024
f6ef5a1
Merge branch 'release/8.45.1' into v8
Dec 16, 2024
85952db
chore(craft): Publish only aws v8 layer (#14703)
andreiborza Dec 16, 2024
c698ad9
feat: Allow capture of more than 1 ANR event [v8] (#14713)
timfish Dec 16, 2024
6e682c4
fix: Normalise ANR debug image file paths if appRoot was supplied [v8…
timfish Dec 16, 2024
9527563
feat(node): Detect Railway release name [v8] (#14714)
AbhiPrasad Dec 16, 2024
d32bf15
fix(nuxt): Remove build config from tsconfig (#14737)
s1gr1d Dec 16, 2024
dcc5742
ref(flags): don't export FeatureFlagContext in types-hoist/context.ts…
aliu39 Dec 16, 2024
0e5e77a
meta(changelog): Update changelog for 8.46.0
s1gr1d Dec 16, 2024
ea72950
Merge pull request #14739 from getsentry/changelog-8.46.0
s1gr1d Dec 17, 2024
5387fde
release: 8.46.0
getsentry-bot Dec 17, 2024
e80eefe
Merge branch 'release/8.46.0' into v8
Dec 17, 2024
3a7743c
feat(core): Add `updateSpanName` helper function [v8] (#14736)
Lms24 Dec 17, 2024
9c53d48
feat(v8/node/deps): Bump @prisma/instrumentation from 5.19.1 to 5.22.…
mydea Dec 17, 2024
8e0db86
chore(docs): Add docs for how to publish a release for previous major…
andreiborza Dec 18, 2024
37fbd75
feat(v8/node): Do not overwrite prisma `db.system` in newer Prisma ve…
mydea Dec 18, 2024
b1d393e
ref(v8/nextjs): Fix typo in source maps deletion warning (#14776)
Lms24 Dec 18, 2024
8107512
feat(v8/replay): Mask srcdoc iframe contents per default (#14779)
chargome Dec 18, 2024
8a7b29e
meta: Update changelog for 8.47.0 (#14777)
Lms24 Dec 18, 2024
eac1a88
release: 8.47.0
getsentry-bot Dec 18, 2024
b6c84fa
Merge branch 'release/8.47.0' into v8
Dec 18, 2024
01a2571
fix(nestjs/v8): Use correct main/module path in package.json (#14791)
AbhiPrasad Dec 19, 2024
d3f52cf
feat(v8/core): Deprecate `getDomElement` method (#14799)
mydea Dec 19, 2024
e7b3530
fix(v8/node): Ensure `NODE_OPTIONS` is not passed to worker threads (…
timfish Dec 23, 2024
bc7e87f
fix(v8/node): Correctly resolve debug IDs for ANR events with custom …
timfish Dec 23, 2024
3693a5d
fix(v8/angular): Fall back to element `tagName` when name is not prov…
Lms24 Dec 23, 2024
90714e1
Init[WIP]
aliu39 Dec 30, 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
16 changes: 0 additions & 16 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ targets:
id: '@sentry-internal/eslint-config-sdk'
includeNames: /^sentry-internal-eslint-config-sdk-\d.*\.tgz$/

# TODO(v9): Remove this target
# NOTE: We publish the v8 layer under its own name so people on v8 can still get patches
# whenever we release a new v8 version—otherwise we would overwrite the current major lambda layer.
- name: aws-lambda-layer
Expand All @@ -159,21 +158,6 @@ targets:
- nodejs20.x
license: MIT

# AWS Lambda Layer target
- name: aws-lambda-layer
includeNames: /^sentry-node-serverless-\d+.\d+.\d+(-(beta|alpha|rc)\.\d+)?\.zip$/
layerName: SentryNodeServerlessSDK
compatibleRuntimes:
- name: node
versions:
- nodejs10.x
- nodejs12.x
- nodejs14.x
- nodejs16.x
- nodejs18.x
- nodejs20.x
license: MIT

# CDN Bundle Target
- name: gcs
id: 'browser-cdn-bundles'
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
branches:
- develop
- master
- v9
- v8
- release/**
pull_request:
merge_group:
Expand Down Expand Up @@ -105,7 +107,7 @@ jobs:
outputs:
commit_label: '${{ env.COMMIT_SHA }}: ${{ env.COMMIT_MESSAGE }}'
# Note: These next three have to be checked as strings ('true'/'false')!
is_develop: ${{ github.ref == 'refs/heads/develop' }}
is_base_branch: ${{ github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/v9' || github.ref == 'refs/heads/v8'}}
is_release: ${{ startsWith(github.ref, 'refs/heads/release/') }}
changed_profiling_node: ${{ steps.changed.outputs.profiling_node == 'true' }}
changed_ci: ${{ steps.changed.outputs.workflow == 'true' }}
Expand All @@ -126,7 +128,7 @@ jobs:
timeout-minutes: 15
if: |
needs.job_get_metadata.outputs.changed_any_code == 'true' ||
needs.job_get_metadata.outputs.is_develop == 'true' ||
needs.job_get_metadata.outputs.is_base_branch == 'true' ||
needs.job_get_metadata.outputs.is_release == 'true' ||
(needs.job_get_metadata.outputs.is_gitflow_sync == 'false' && needs.job_get_metadata.outputs.has_gitflow_label == 'false')
steps:
Expand Down Expand Up @@ -171,7 +173,7 @@ jobs:
key: nx-Linux-${{ github.ref }}-${{ env.HEAD_COMMIT || github.sha }}
# On develop branch, we want to _store_ the cache (so it can be used by other branches), but never _restore_ from it
restore-keys:
${{needs.job_get_metadata.outputs.is_develop == 'false' && env.NX_CACHE_RESTORE_KEYS || 'nx-never-restore'}}
${{needs.job_get_metadata.outputs.is_base_branch == 'false' && env.NX_CACHE_RESTORE_KEYS || 'nx-never-restore'}}

- name: Build packages
# Set the CODECOV_TOKEN for Bundle Analysis
Expand Down Expand Up @@ -219,7 +221,7 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-20.04
if:
github.event_name == 'pull_request' || needs.job_get_metadata.outputs.is_develop == 'true' ||
github.event_name == 'pull_request' || needs.job_get_metadata.outputs.is_base_branch == 'true' ||
needs.job_get_metadata.outputs.is_release == 'true'
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/enforce-license-compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@ name: "CI: Enforce License Compliance"

on:
push:
branches: [master, develop, release/*]
branches:
- develop
- master
- v9
- v8
- release/**
pull_request:
branches: [master, develop]
branches:
- develop
- master
- v9
- v8

jobs:
enforce-license-compliance:
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,33 @@

- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott

Work in this release was contributed by @arturovt. Thank you for your contribution!

## 8.47.0

- feat(v8/core): Add `updateSpanName` helper function (#14736)
- feat(v8/node): Do not overwrite prisma `db.system` in newer Prisma versions (#14772)
- feat(v8/node/deps): Bump @prisma/instrumentation from 5.19.1 to 5.22.0 (#14755)
- feat(v8/replay): Mask srcdoc iframe contents per default (#14779)
- ref(v8/nextjs): Fix typo in source maps deletion warning (#14776)

Work in this release was contributed by @aloisklink and @benjick. Thank you for your contributions!

## 8.46.0

- feat: Allow capture of more than 1 ANR event [v8] ([#14713](https://github.com/getsentry/sentry-javascript/pull/14713))
- feat(node): Detect Railway release name [v8] ([#14714](https://github.com/getsentry/sentry-javascript/pull/14714))
- fix: Normalise ANR debug image file paths if appRoot was supplied [v8] ([#14709](https://github.com/getsentry/sentry-javascript/pull/14709))
- fix(nuxt): Remove build config from tsconfig ([#14737](https://github.com/getsentry/sentry-javascript/pull/14737))

Work in this release was contributed by @conor-ob. Thank you for your contribution!

## 8.45.1

- fix(feedback): Return when the `sendFeedback` promise resolves ([#14683](https://github.com/getsentry/sentry-javascript/pull/14683))

Work in this release was contributed by @antonis. Thank you for your contribution!

## 8.45.0

- feat(core): Add `handled` option to `captureConsoleIntegration` ([#14664](https://github.com/getsentry/sentry-javascript/pull/14664))
Expand Down
4 changes: 2 additions & 2 deletions dev-packages/browser-integration-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/browser-integration-tests",
"version": "8.45.0",
"version": "8.47.0",
"main": "index.js",
"license": "MIT",
"engines": {
Expand Down Expand Up @@ -43,7 +43,7 @@
"@babel/preset-typescript": "^7.16.7",
"@playwright/test": "^1.44.1",
"@sentry-internal/rrweb": "2.31.0",
"@sentry/browser": "8.45.0",
"@sentry/browser": "8.47.0",
"axios": "1.7.7",
"babel-loader": "^8.2.2",
"html-webpack-plugin": "^5.5.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect } from '@playwright/test';
import type { Event } from '@sentry/core';
import { type Event, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME } from '@sentry/core';

import {
SEMANTIC_ATTRIBUTE_SENTRY_OP,
Expand All @@ -10,27 +10,34 @@ import {
import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';

sentryTest('sets the source to custom when updating the transaction name', async ({ getLocalTestUrl, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}
sentryTest(
'sets the source to custom when updating the transaction name with `span.updateName`',
async ({ getLocalTestUrl, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}

const url = await getLocalTestUrl({ testDir: __dirname });
const url = await getLocalTestUrl({ testDir: __dirname });

const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);

const traceContextData = eventData.contexts?.trace?.data;
const traceContextData = eventData.contexts?.trace?.data;

expect(traceContextData).toMatchObject({
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'pageload',
});
expect(traceContextData).toBeDefined();

expect(eventData.transaction).toBe('new name');
expect(eventData.transaction).toBe('new name');

expect(eventData.contexts?.trace?.op).toBe('pageload');
expect(eventData.spans?.length).toBeGreaterThan(0);
expect(eventData.transaction_info?.source).toEqual('custom');
});
expect(traceContextData).toMatchObject({
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'pageload',
});

expect(traceContextData![SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]).toBeUndefined();

expect(eventData.contexts?.trace?.op).toBe('pageload');
expect(eventData.spans?.length).toBeGreaterThan(0);
expect(eventData.transaction_info?.source).toEqual('custom');
},
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;
window._testBaseTimestamp = performance.timeOrigin / 1000;

Sentry.init({
dsn: 'https://[email protected]/1337',
integrations: [Sentry.browserTracingIntegration()],
tracesSampleRate: 1,
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const activeSpan = Sentry.getActiveSpan();
const rootSpan = activeSpan && Sentry.getRootSpan(activeSpan);

Sentry.updateSpanName(rootSpan, 'new name');
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { expect } from '@playwright/test';
import { type Event, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME } from '@sentry/core';

import {
SEMANTIC_ATTRIBUTE_SENTRY_OP,
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
} from '@sentry/browser';
import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';

sentryTest(
'sets the source to custom when updating the transaction name with Sentry.updateSpanName',
async ({ getLocalTestUrl, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}

const url = await getLocalTestUrl({ testDir: __dirname });

const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);

const traceContextData = eventData.contexts?.trace?.data;

expect(traceContextData).toBeDefined();

expect(traceContextData).toMatchObject({
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'pageload',
});

expect(traceContextData![SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]).toBeUndefined();

expect(eventData.transaction).toBe('new name');

expect(eventData.contexts?.trace?.op).toBe('pageload');
expect(eventData.spans?.length).toBeGreaterThan(0);
expect(eventData.transaction_info?.source).toEqual('custom');
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,9 @@ async function captureErrorAndGetEnvelopeTraceHeader(page: Page): Promise<Partia
await page.locator('#btnCaptureError').click();

const [, errorEnvelopeTraceHeader] = (await errorEventPromise)[0];

// @ts-expect-error - EventEnvelopeHeaders type in (types/envelope.ts) suggests that trace_id is optional,
// which the DynamicSamplingContext type does not permit.
// TODO(v9): We should adjust the EventEnvelopeHeaders type because the trace header always needs to have a trace_id
return errorEnvelopeTraceHeader;
}
2 changes: 1 addition & 1 deletion dev-packages/bundle-analyzer-scenarios/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/bundle-analyzer-scenarios",
"version": "8.45.0",
"version": "8.47.0",
"description": "Scenarios to test bundle analysis with",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/dev-packages/bundle-analyzer-scenarios",
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/clear-cache-gh-action/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sentry-internal/clear-cache-gh-action",
"description": "An internal Github Action to clear GitHub caches.",
"version": "8.45.0",
"version": "8.47.0",
"license": "MIT",
"engines": {
"node": ">=18"
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/e2e-tests",
"version": "8.45.0",
"version": "8.47.0",
"license": "MIT",
"private": true,
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import { SampleComponent } from '../sample-component/sample-component.components
selector: 'app-cancel',
standalone: true,
imports: [TraceModule, SampleComponent],
template: `<app-sample-component [trace]="'sample-component'"></app-sample-component>`,
template: `
<app-sample-component [trace]="'sample-component'"></app-sample-component>
<app-sample-component trace></app-sample-component>
`,
})
@TraceClass({ name: 'ComponentTrackingComponent' })
export class ComponentTrackingComponent implements OnInit, AfterViewInit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ test.describe('finish routing span', () => {
});

test.describe('TraceDirective', () => {
test('creates a child tracingSpan with component name as span name on ngOnInit', async ({ page }) => {
test('creates a child span with the component name as span name on ngOnInit', async ({ page }) => {
const navigationTxnPromise = waitForTransaction('angular-17', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'navigation';
});
Expand All @@ -201,23 +201,36 @@ test.describe('TraceDirective', () => {
// immediately navigate to a different route
const [_, navigationTxn] = await Promise.all([page.locator('#componentTracking').click(), navigationTxnPromise]);

const traceDirectiveSpan = navigationTxn.spans?.find(
const traceDirectiveSpans = navigationTxn.spans?.filter(
span => span?.data && span?.data[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] === 'auto.ui.angular.trace_directive',
);

expect(traceDirectiveSpan).toBeDefined();
expect(traceDirectiveSpan).toEqual(
expect.objectContaining({
data: {
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.angular.init',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_directive',
},
description: '<sample-component>',
op: 'ui.angular.init',
origin: 'auto.ui.angular.trace_directive',
start_timestamp: expect.any(Number),
timestamp: expect.any(Number),
}),
expect(traceDirectiveSpans).toHaveLength(2);
expect(traceDirectiveSpans).toEqual(
expect.arrayContaining([
expect.objectContaining({
data: {
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.angular.init',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_directive',
},
description: '<sample-component>', // custom component name passed to trace directive
op: 'ui.angular.init',
origin: 'auto.ui.angular.trace_directive',
start_timestamp: expect.any(Number),
timestamp: expect.any(Number),
}),
expect.objectContaining({
data: {
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.angular.init',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_directive',
},
description: '<app-sample-component>', // fallback selector name
op: 'ui.angular.init',
origin: 'auto.ui.angular.trace_directive',
start_timestamp: expect.any(Number),
timestamp: expect.any(Number),
}),
]),
);
});
});
Expand Down
2 changes: 2 additions & 0 deletions dev-packages/e2e-tests/test-applications/angular-19/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ import { TraceClass, TraceMethod, TraceModule } from '@sentry/angular';
import { SampleComponent } from '../sample-component/sample-component.components';

@Component({
selector: 'app-cancel',
selector: 'app-component-tracking',
standalone: true,
imports: [TraceModule, SampleComponent],
template: `<app-sample-component [trace]="'sample-component'"></app-sample-component>`,
template: `
<app-sample-component trace="sample-component"></app-sample-component>
<app-sample-component trace></app-sample-component>
`,
})
@TraceClass({ name: 'ComponentTrackingComponent' })
export class ComponentTrackingComponent implements OnInit, AfterViewInit {
Expand Down
Loading
Loading