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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as Sentry from '@sentry/node';
import { loggingTransport } from '@sentry-internal/node-integration-tests';

Sentry.init({
traceLifecycle: 'static',
dsn: 'https://public@dsn.ingest.sentry.io/1337',
release: '1.0',
tracePropagationTargets: [/\/v0/, 'v1'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createRunner } from '../../../../utils/runner';

test('envelope header for error event during active unsampled span is correct', async () => {
await createRunner(__dirname, 'scenario.ts')
.ignore('transaction')
.ignore('span')
.expectHeader({
event: {
trace: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as Sentry from '@sentry/node';
import { loggingTransport } from '@sentry-internal/node-integration-tests';

Sentry.init({
traceLifecycle: 'static',
dsn: 'https://public@dsn.ingest.sentry.io/1337',
release: '1.0',
tracePropagationTargets: [/\/v0/, 'v1'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createRunner } from '../../../../utils/runner';

test('envelope header for error event during active span is correct', async () => {
await createRunner(__dirname, 'scenario.ts')
.ignore('transaction')
.ignore('span')
.expectHeader({
event: {
trace: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as Sentry from '@sentry/node';
import { loggingTransport } from '@sentry-internal/node-integration-tests';

Sentry.init({
traceLifecycle: 'static',
dsn: 'https://public@dsn.ingest.sentry.io/1337',
release: '1.0',
tracePropagationTargets: [/\/v0/, 'v1'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const { loggingTransport } = require('@sentry-internal/node-integration-tests');
const Sentry = require('@sentry/node');

Sentry.init({
traceLifecycle: 'static',
dsn: 'https://public@dsn.ingest.sentry.io/1337',
release: '1.0',
// disable attaching headers to /test/* endpoints
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ describe('tracesSampleRate propagation', () => {

const traceId = '12345678123456781234567812345678';

test('uses sample rate from incoming baggage header in trace envelope item', async () => {
test('uses the incoming sample rate in the streamed span envelope header', async () => {
const runner = createRunner(__dirname, 'server.js')
.expectHeader({
transaction: {
span: {
trace: {
public_key: 'public',
sample_rate: '0.05',
sampled: 'true',
trace_id: traceId,
Expand All @@ -22,10 +23,10 @@ describe('tracesSampleRate propagation', () => {
},
})
.start();
runner.makeRequest('get', '/test', {
await runner.makeRequest('get', '/test', {
headers: {
'sentry-trace': `${traceId}-1234567812345678-1`,
baggage: `sentry-sample_rate=0.05,sentry-trace_id=${traceId},sentry-sampled=true,sentry-transaction=myTransaction,sentry-sample_rand=0.42`,
baggage: `sentry-public_key=public,sentry-sample_rate=0.05,sentry-trace_id=${traceId},sentry-sampled=true,sentry-transaction=myTransaction,sentry-sample_rand=0.42`,
},
});
await runner.completed();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import * as Sentry from '@sentry/node';
import { loggingTransport } from '@sentry-internal/node-integration-tests';

Sentry.init({
traceLifecycle: 'static',
dsn: 'https://public@dsn.ingest.sentry.io/1337',
release: '1.0',
tracePropagationTargets: [/\/v0/, 'v1'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { expect, test } from 'vitest';
import { createRunner } from '../../../../utils/runner';

test('envelope header for transaction event of route correct', async () => {
test('includes the route name in the streamed span envelope header', async () => {
await createRunner(__dirname, 'scenario.ts')
.expectHeader({
transaction: {
span: {
trace: {
trace_id: expect.stringMatching(/[a-f\d]{32}/),
public_key: 'public',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import * as Sentry from '@sentry/node';
import { loggingTransport } from '@sentry-internal/node-integration-tests';

Sentry.init({
traceLifecycle: 'static',
dsn: 'https://public@dsn.ingest.sentry.io/1337',
release: '1.0',
tracePropagationTargets: [/\/v0/, 'v1'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { expect, test } from 'vitest';
import { createRunner } from '../../../../utils/runner';

test('envelope header for transaction event with source=url correct', async () => {
test('omits the URL-sourced name from the streamed span envelope header', async () => {
await createRunner(__dirname, 'scenario.ts')
.expectHeader({
transaction: {
span: {
trace: {
trace_id: expect.stringMatching(/[a-f\d]{32}/),
public_key: 'public',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as Sentry from '@sentry/node';
import { loggingTransport } from '@sentry-internal/node-integration-tests';

Sentry.init({
traceLifecycle: 'static',
dsn: 'https://public@dsn.ingest.sentry.io/1337',
release: '1.0',
tracePropagationTargets: [/\/v0/, 'v1'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { expect, test } from 'vitest';
import { createRunner } from '../../../../utils/runner';

test('envelope header for transaction event is correct', async () => {
test('envelope header for streamed spans is correct', async () => {
await createRunner(__dirname, 'scenario.ts')
.expectHeader({
transaction: {
span: {
trace: {
trace_id: expect.stringMatching(/[a-f\d]{32}/),
public_key: 'public',
Expand Down
Loading