์ด๊ฒ์ ์ด๋ณด์ ์ง๋ฌธ ์ผ ์ ์์ง๋ง JSON.stringify (API_responseObj)๋ฅผ ์ฌ์ฉํ์ฌ captureMessage ๋ฐ captureException์ ๋ก๊ทธ๋ฅผ ์ถ๊ฐํ๊ณ ์ถ์ต๋๋ค.
API_responseObj๋ ์ง๋ฌธ ๋ฐ logentry ๋ฉ์์ง obj์ ์ผ๋ถ ํ
์คํธ ํ์ ์๋ฆฝ๋๋ค.
console.log์ ์ํด ๋ฉ์์ง obj๊ฐ ์์ ํ ์ ๋ณด๋ฅผ ๊ฐ๋ ๊ฒ๊ณผ ๋์ผํ ๊ฒ์ด ์ถ๊ฐ๋๋ฉด ๋ก๊ฑฐ๊ฐ ์ฝ์ ์ผ ์ ์์ต๋๋ค.
์์ ํ ๊ฐ์ฒด๋ฅผ ์ธ์ํ๊ธฐ ์ํด JSON.stringify (OBJ)์ ๊ฐ์ ๋ชจ๋ ํค๋ฅผ ๋ฐ๋ณตํ์ง ์๊ณ ๋ฌธ์์ด ํ์์ผ๋ก Sentry ๋ก๊ทธ์ ์์ ํ ์๋ต ๊ฐ์ฒด๋ฅผ ์ถ๊ฐ ํ ์์๋ ๋ฐฉ๋ฒ์ ์ ๊ณต ํ ์ ์์ต๋๊น?
๊ฐ์ฌ.
์๋
ํ์ธ์ @ kishor-bhatt, extra
์ปจํ
์คํธ โ https://docs.sentry.io/enriching-error-data/context/?platform=javascript๋ฅผ ์ฌ์ฉํ์ฌ์ด ์์
์ ์ํ ํ ์ ์์ต๋๋ค.
Sentry.withScope((scope) => {
scope.setExtra("response", API_responseObj);
Sentry.captureException(err);
});
์๋ ์นด๋ฐ,
setExtra๋ก ์ถ๊ฐํ๊ฒ ์ต๋๋ค. ๋ช ํํ ํด์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค.
๋ฌธ์ ์ธ์ฌ,
ํค ์ผ๋ฅด
2018 ๋ 12 ์ 12 ์ผ ์์์ผ ์คํ 3:39 Kamil Ogรณrek, [email protected] ์์ฑ :
์๋ ํ์ธ์ @ kishor-bhatt https://github.com/kishor-bhatt , ๋น์ ์ ์ด๊ฒ์ ํ ์ ์์ต๋๋ค
์ถ๊ฐ ์ปจํ ์คํธ ์ฌ์ฉ โ
https://docs.sentry.io/enriching-error-data/context/?platform=javascriptSentry.withScope ((๋ฒ์) => {
scope.setExtra ( "response", API_responseObj);
Sentry.captureException (err);
});
โ
๋น์ ์ด ์ธ๊ธ ๋์๊ธฐ ๋๋ฌธ์ ์ด๊ฒ์ ๋ฐ๊ณ ์์ต๋๋ค.
์ด ์ด๋ฉ์ผ์ ์ง์ ๋ต์ฅํ๊ณ GitHub์์ ํ์ธํ์ธ์.
https://github.com/getsentry/sentry-javascript/issues/1794#issuecomment-446533014 ,
๋๋ ์ค๋ ๋ ์์๊ฑฐ
https://github.com/notifications/unsubscribe-auth/AQIaZTKfeiOdvQhli3awbC6Lu6iDi9jiks5u4NXwgaJpZM4ZPDwn
.
์ธ์ ๋ ์ง!
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
์๋ ์นด๋ฐ,
setExtra๋ก ์ถ๊ฐํ๊ฒ ์ต๋๋ค. ๋ช ํํ ํด์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค.
๋ฌธ์ ์ธ์ฌ,
ํค ์ผ๋ฅด
2018 ๋ 12 ์ 12 ์ผ ์์์ผ ์คํ 3:39 Kamil Ogรณrek, [email protected] ์์ฑ :