Skip to content

Commit

Permalink
fix: max value of per page
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien2p committed Oct 26, 2022
1 parent 973a108 commit aa699fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/medusa-plugin-sentry/src/services/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ export default class SentryService extends TransactionBaseService {
perPage?: string | number;
cursor?: string;
}): Promise<SentryFetchResult> {
perPage = perPage ?? 100;
perPage = Math.min(Number(perPage ?? 100), 100);

const queryParams = {
field: ['transaction', 'tpm()', 'p50()', 'p75()', 'p95()', 'failure_rate', 'apdex()'],
per_page: Number(perPage),
per_page: perPage,
project,
query: `event.type:transaction${query ? ' AND ' + query : ''}`,
statsPeriod,
Expand Down Expand Up @@ -118,11 +118,11 @@ export default class SentryService extends TransactionBaseService {
perPage?: string | number;
cursor?: string;
}): Promise<SentryFetchResult> {
perPage = perPage ?? 100;
perPage = Math.min(Number(perPage ?? 100), 100);

const queryParams = {
field: ['id', 'transaction.duration', 'timestamp', 'spans.db', 'project'],
per_page: Number(perPage),
per_page: perPage,
project,
query: `event.type:transaction AND transaction:"${transaction}"${query ? ' AND ' + query : ''}`,
statsPeriod,
Expand Down

0 comments on commit aa699fa

Please sign in to comment.