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

SvelteJapanOnlineMeetup#2_SvelteKitアプリケーションのモニタ...

 SvelteJapanOnlineMeetup#2_SvelteKitアプリケーションのモニタリングを考える

naoketa

March 22, 2024
Tweet

Other Decks in Programming

Transcript

  1. • ΍Γํ͸ϝϯόʔ΍ମ੍ɺѻ͏ϏδωεɺΞϓϦέʔγϣϯʹΑ༷ͬͯʑɻ • ϝϯόʔ΍ମ੍ • (ྫ)όοΫΤϯυ/ϑϩϯτΤϯυͷϝϯόʔ͕ͦΕͧΕݟ͍ͯΔɻΫϩεϑΝϯΫγϣφϧͳνʔϜͰݟ ͍ͯΔɻSREνʔϜ͕ݟ͍ͯΔɻetc • ѻ͏Ϗδωε/ΞϓϦέʔγϣϯ •

    (ྫ)αʔϏε͕ࢭ·Δ͜ͱͰϏδωεӨڹ͕େ͖͍ɻฏ೔೔தଳ͔͠࢖Θͳ͍ɻetc • ͲΜͳ໨తͰԿΛϞχλϦϯά͢Δ΂͖͔ɻ ϑϩϯτΤϯυͷϞχλϦϯά΍؂ࢹͬͯͲ͏͞Εͯ·͔͢ʁ
  2. ϑϩϯτΤϯυͷϞχλϦϯάͷ໨త • ໨త • Ϣʔβ͔Βݟͯʮಈ͖ଓ͚Δ͜ͱ で ͸ͳ͘ɺૉૣ͘ϩʔ ド ͞ΕΔ͜ͱʯ͕࠷ऴΰʔϧ •

    ղܾ͍ͨ͠՝୊ • ϑϩϯτΤϯυͰ͸ಈ࡞؀ڥ͕όϥόϥ(୺຤ɺϒϥ΢βɺωοτϫʔΫetc)ɻ • શύλʔϯֻ͚߹Θͤͯςετ͢Δͷ͸ෆՄೳɻ࣮ࡍͷϢʔβͷ؀ڥͰΰʔϧΛຬͨͤΔͷ ͔νΣοΫ͕೉͍͠ɻ • όάใࠂ͕͋ͬͯ΋ͳ͔ͥ࠶ݱ͠ͳ͍ɻ͓·؀ɻ • ϑϩϯτΤϯυ͔ΒόοΫΤϯυ·ͰΤϯυπʔΤϯυͰ؂ࢹ͍͕ͨ͠ɺϑϩϯτΤϯυ͸ ޙखʹपΓ͕ͪɻ (ࢀߟ)O’Reilly Japan, Incʮೖ໳ ؂ࢹ ―ϞμϯͳϞχλϦϯάͷͨΊͷσβΠϯύλʔϯʯ
  3. ϑϩϯτΤϯυͷϞχλϦϯάͷೋͭͷΞϓϩʔν • ϦΞϧϢʔβ؂ࢹ (࣮ࡍͷϢʔβར༻ͷ؂ࢹ) • ύϑΥʔϚϯε؂ࢹɿ࣮ࡍͷϢʔβ͔Βͷݟ͑ํͷύϑΥʔϚϯεΛ؂ࢹ • Τϥʔ؂ࢹɿ࣮ࡍͷϢʔβͷϒϥ΢β্Ͱൃੜͨ͠ΤϥʔΛ؂ࢹ • γϯηςΟοΫ؂ࢹ

    (ਓҝతͳϦΫΤετΛ࢖ͬͨ؂ࢹ) • URLࢮ׆؂ࢹɿಛఆͷΤϯυϙΠϯτ͕׆͖͍ͯΔ͜ͱͷ؂ࢹ • γφϦΦ؂ࢹɿWebαΠτͷॏཁͳಋઢ͕ػೳ͍ͯ͠Δ͜ͱͷ؂ࢹ (ࢀߟ)O’Reilly Japan, Incʮೖ໳ ؂ࢹ ―ϞμϯͳϞχλϦϯάͷͨΊͷσβΠϯύλʔϯʯ
  4. Ͳ͏΍ͬͯϞχλϦϯά͢Δ͔ʁ • πʔϧυϦϒϯͰߟ͑ͳ͍ • πʔϧͰऔΕΔ͔ΒͱແବͳϝτϦΫεΛऔͬͯ΋ϊΠζɻ • ʮࠓ࢖ͬͯΔπʔϧͩͱऔΕͳ͍͔Βɻɻʯ͸ຊ຤స౗ɻ • ඞཁͳ΋ͷΛ૊Έ߹ΘͤՄೳʹ͢Δ •

    ΞϓϦέʔγϣϯ΋ཉ͍͠৘ใ΋؂ࢹπʔϧ΋ਐԽ͍ͯ͘͠ɻ • πʔϧΛӡ༻͢ΔதͰ૊Έ׵͑ͯ௕ظతʹվળ͍ͯ͘͠ɻ (ࢀߟ)O’Reilly Japan, Incʮೖ໳ ؂ࢹ ―ϞμϯͳϞχλϦϯάͷͨΊͷσβΠϯύλʔϯʯ
  5. ͓୊ɿAmplifyͰϗετ͢ΔSvelteKitΞϓϦέʔγϣϯͷϞχλϦϯά • SSRΛؚΉSvelteKitͳΞϓϦέʔγϣϯΛྫʹɺAmplifyͰϗεςΟϯάͯ͠ϞχλϦϯά Lambda@Edge S3 CloudFront Amplify Github Developer User

    git push amplify cli AWS؅ཧ(Πϝʔδ) "84಺෦ͰσϓϩΠ؅ཧ͞ΕΔϦιʔε ˞࣮ࡍͷϦιʔε͸ར༻ऀ͔Βݟ͑ͳ͍ͨΊɺ ࣮ࡍʹ͸-BNCEB!&EHFͰ͸ͳ͍Մೳੑ͋Γ Amplifyͷߏ੒Πϝʔδ SSR౳ ੩తϑΝΠϧऔಘ౳
  6. AmplifyͰϗετ͢ΔSvelteKitΞϓϦέʔγϣϯͷϞχλϦϯά • SSRΛؚΉSvelteKitͳΞϓϦέʔγϣϯΛྫʹɺAmplifyͰϗεςΟϯάͯ͠ϞχλϦϯά Amplify User CloudWatch Alarm CloudWatch Logs CloudWatch

    Metrics CloudWatch RUM Synthetic Canary Slack౳ AWS ChatBot SSR΍APIͷϩΪϯά/ϝτϦΫε ϦΞϧϢʔβ؂ࢹ γϯηςΟοΫ؂ࢹ ϞχλϦϯάͷߏ੒Πϝʔδ
  7. AmplifyͰϗετ͢ΔSvelteKitΞϓϦέʔγϣϯͷϞχλϦϯά • SSRΛؚΉSvelteKitͳΞϓϦέʔγϣϯΛྫʹɺAmplifyͰϗεςΟϯάͯ͠ϞχλϦϯά Amplify User CloudWatch Alarm CloudWatch Logs CloudWatch

    Metrics CloudWatch RUM Synthetic Canary Slack౳ AWS ChatBot SSR΍APIͷϩΪϯά/ϝτϦΫε ϦΞϧϢʔβ؂ࢹ γϯηςΟοΫ؂ࢹ ϞχλϦϯάͷߏ੒Πϝʔδ
  8. (࠶ܝ)AmplifyͰϗετ͢ΔSvelteKitΞϓϦέʔγϣϯͷϞχλϦϯά • SSRΛؚΉSvelteKitͳΞϓϦέʔγϣϯΛྫʹɺAmplifyͰϗεςΟϯάͯ͠ϞχλϦϯά Amplify User CloudWatch Alarm CloudWatch Logs CloudWatch

    Metrics CloudWatch RUM Synthetic Canary Slack౳ AWS ChatBot SSR΍APIͷϩΪϯά/ϝτϦΫε ϦΞϧϢʔβ؂ࢹ γϯηςΟοΫ؂ࢹ ϞχλϦϯάͷߏ੒Πϝʔδ
  9. (࠶ܝ)AmplifyͰϗετ͢ΔSvelteKitΞϓϦέʔγϣϯͷϞχλϦϯά • SSRΛؚΉSvelteKitͳΞϓϦέʔγϣϯΛྫʹɺAmplifyͰϗεςΟϯάͯ͠ϞχλϦϯά Amplify User CloudWatch Alarm CloudWatch Logs CloudWatch

    Metrics CloudWatch RUM Synthetic Canary Slack౳ AWS ChatBot SSR΍APIͷϩΪϯά/ϝτϦΫε ϦΞϧϢʔβ؂ࢹ γϯηςΟοΫ؂ࢹ ϞχλϦϯάͷߏ੒Πϝʔδ