mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-25 07:32:19 -05:00
Try ignoreTransaction
This commit is contained in:
parent
3b1849d745
commit
700c176f18
|
|
@ -4,6 +4,7 @@ import { eventStream } from "remix-utils/sse/server";
|
|||
import { emitter } from "../core/emitters.server";
|
||||
import { bracketSubscriptionKey } from "../tournament-bracket-utils";
|
||||
import { tournamentIdFromParams } from "~/features/tournament";
|
||||
import { ignoreTransaction } from "~/utils/newrelic.server";
|
||||
|
||||
export const loader = ({ request, params }: LoaderFunctionArgs) => {
|
||||
const tournamentId = tournamentIdFromParams(params);
|
||||
|
|
@ -14,6 +15,8 @@ export const loader = ({ request, params }: LoaderFunctionArgs) => {
|
|||
scores: [number, number];
|
||||
isOver: boolean;
|
||||
}) => {
|
||||
ignoreTransaction();
|
||||
|
||||
send({
|
||||
event: bracketSubscriptionKey(tournamentId),
|
||||
data: `${args.matchId}-${args.scores[0]}-${args.scores[1]}-${String(
|
||||
|
|
|
|||
|
|
@ -27,3 +27,10 @@ export const noticeError = (
|
|||
|
||||
export const setTransactionName = (name: string) =>
|
||||
isEnabled && newrelic.setTransactionName(name);
|
||||
|
||||
export const ignoreTransaction = () => {
|
||||
if (!isEnabled) return;
|
||||
|
||||
const transactionHandle = newrelic.getTransaction();
|
||||
transactionHandle.ignore();
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user