Upgrade to Pro — share decks privately, control downloads, hide ads and more …

エラーハンドリングと監視

 エラーハンドリングと監視

2021/6/27に発表した資料です。

OKUNOKENTARO

June 27, 2021
Tweet

More Decks by OKUNOKENTARO

Other Decks in Technology

Transcript

  1. !PLVOPLFOUBSP
    Τϥʔϋϯ
    υ
    Ϧ
    ϯάͱ؂ࢹ
    +VO *SJT-5ձ

    View full-size slide


  2. w Ԟ໺ݡଠ࿠!PLVOPLFOUBSP
    w ΫϨε΢ΣΞגࣜձࣾ
    w .S໰୊ղܾ
    w 5ZQF4DSJQUϑϩϯ
    τΤϯ
    υɺ
    όοΫΤϯ
    υ

    View full-size slide

  3. ෆ۩߹ͱͷ෇͖߹͍
    w ࣗ෼Ͱશͯͷෆ۩߹Λݟ͚ͭग़͢ʹ͸࿙Ε͕ͰΔ
    w ෆ۩߹͕શ͘ແ͍͜ͱͷূ໌͸ɺ
    ѱຐͷূ໌
    w Ϣʔβʔ͸૝ఆ֎ͷ࢖͍ํΛ͢Δ
    w ࣗ෼͕ݟ͚͍ͭͯͳ͍ෆ۩߹ΛαʔϏεӡ༻தʹൃݟ͞Εͯ͠·
    ͏͔΋
    w ى͍ͬͯ͜ΔΤϥʔΛ೺Ѳ͓͖͍ͯͨ͠

    View full-size slide

  4. 4FOUSZ
    w ηϯ
    τ
    Ϧʔ
    w IUUQTTFOUSZJP
    w Ϋϥ
    ογϡ
    Ϩϙʔ
    τ4BB4
    w γεςϜશମ͸%BUBEPHɺ
    ϥϯλΠϜΤϥʔ͸4FOUSZͰ࢖͍෼͚
    w npm i @sentry/nodeɹ
    w Τϯ
    τ
    ϦϙΠϯ
    τͰSentry.init({ ؀ڥม਺ });
    ͜ͷࣸਅ͸σόοά༻αʔόʔͷΤϥʔ਺ͳͷͰ

    ͨ͘
    ͞Μ͋ͬͯΑ͍

    View full-size slide

  5. αʔόʔΞϓϦέʔγϣ
    ϯΛεΫϥ
    ον͢Δ
    w αʔόʔΞϓϦέʔγϣϯ։ൃ &YQSFTT
    ʹ͓͍ͯॳظʹணखͨ͠ͷ͕
    w σόοάϩΨʔ
    w ؀ڥม਺஫ೖ

    View full-size slide

  6. "1*ήʔ
    τ΢ΣΠ
    ɾ
    αʔόʔ
    w ΫϥΠΞϯ
    τ
    ɾ
    ΞϓϦέʔγϣϯ͔Βͷ)551ϦΫΤε
    τΛ

    όοΫΤϯ
    υ
    ɾ
    αʔϏε܈ʹৼΓ෼͚Δ੹຿
    w όοΫΤϯ
    υ
    ɾ
    αʔϏε܈ͷฦ͢஋Λ

    ΫϥΠΞϯ
    τ
    ɾ
    ΞϓϦέʔγϣϯʹ)551Ϩεϙϯεͱͯ͠ฦ͢੹຿
    w ஥հ԰ͱͯ͠͸

    Ͳͷෆ۩߹͕Ͳ͜ͷ୭ʹΑͬͯҾ͖ى͜͞Ε͔͕ͨͱͯ΋ॏཁ

    View full-size slide

  7. ๷ޚతϓϩάϥ
    ϛϯάͱܖ໿
    w Ͳ͜ͷ୭Λଈ࠲ʹಛఆ͢ΔͨΊʹ๷ޚతϓϩάϥ
    ϛϯάͱܖ໿Λಋೖ
    w ๷ޚతϓϩάϥ
    ϛϯά
    w جຊతʹΑ
    ͘ͳ͍͜ͱ͕ى͜Δͱߟ࣮͑ͯ૷͢Δख๏
    w όϦσʔγϣϯ౳
    w ܖ໿ʹΑΔઃܭ %FTJHOCZ$POUSBDU %C$

    w ຬͨ͞ΕΔ΂͖࢓༷Λ࣮૷தʹද໌͢Δख๏
    w Ξαʔγϣϯ౳
    https://speakerdeck.com/twada/php-conference-2016

    View full-size slide

  8. ͳΜͰ΋͔ΜͰ΋
    ʮόάʯ
    ͱݺ͹ͳ͍
    w όά
    w ࣗ෼ͨͪͷ࣮૷ʹޡΓ͕͋ͬͯىͬͨ͜ෆ۩߹
    w ܖ໿ҧ൓
    w ֎෦αʔϏε͕ද໌͍ͯ͠Δ࢓༷ͱҟͳΔڍಈΛͯ͠ىͬͨ͜ෆ۩߹

    ʢྫOVNCFSܕΛฦ͢ͱॻ͔Ε͍ͯΔͷʹจࣈྻ͕ฦ͖ͬͯͨɺ
    υΩϡϝϯ
    τʹॻ͔Ε͍ͯΔϓϩύςΟ͕ແ͍ɺ
    ͳͲʣ

    w Τϥʔ
    w )551ϦΫΤε
    τʹؚ·Ε͍ͯͨ஋ʹޡΓ͕͋Δ
    w ͜Ε͸ෆ۩߹Ͱ͸ͳ͘ى͜
    Γ
    ͏
    Δࣄ৅ͳͷͰΤϥʔΛฦ٫
    w ൃੜ࣌ͷεςʔλείʔ
    υΛYYʹ͢΂͖͔ʹ͢΂͖͔ͷ൑அج४Ͱ΋͋Δ

    View full-size slide

  9. ద੾ͳ൜ਓ୳͠
    w "1*ήʔ
    τ΢ΣΠ
    ɾ
    αʔόʔ͸େྔͷYY Λฦ͕ͪ͠
    w Ωϟονͨ͠ྫ֎Λ͢΂ͯࣗ෼ͨͪͷੜΜͩόάͱଊ͑ͯ͠·
    ͏
    ͱ

    ݪҼڀ໌͕஗ΕΔ
    w Τϥʔ؂ࢹͰ͍ͭͰ΋
    ʮ͜Ε͸֎෦ͷ͍ͤͰ͋Δʯ
    ͱࠜڌΛ΋ͬͯओுͰ͖ΔΑ
    ͏ʹ
    w ๷ޚతϓϩάϥ
    ϛϯάɺ
    ܖ໿ʹΑΔઃܭ
    w 4FOUSZͷϩάΛݟͨॠؒʹ
    ʮ୭͕ԿΛ͔ͨ͠Βى͖ͨʯ
    ͕ಛఆͰ͖Δͱ

    νʔϜ΁ͷमਖ਼ґཔ͕ਝ଎
    w 4FOUSZͷϩάͷ࢒͠ํ͸͜Ε͕ਖ਼ղͱ͍͏Θ͚Ͱ͸ͳ͍

    ʢࠓճ͸Ϧ
    Ϧʔε௚ޙͷεύΠΫ؂ࢹʹ͍ͭͯͷΈݴٴʣ

    View full-size slide