mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-09 20:56:02 -05:00
Try ignoreTransaction
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user