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

Mackerel x Twilio Hands-On Seminar - Mackerel 編

Daisuke Inoue
December 02, 2016

Mackerel x Twilio Hands-On Seminar - Mackerel 編

Mackerel x Twilio Hands-On Seminar https://mackerelio.connpass.com/event/44324/ で使用した資料のうち、Mackerel 編の資料です。

Daisuke Inoue

December 02, 2016
Tweet

More Decks by Daisuke Inoue

Other Decks in Technology

Transcript

  1. 2 / 61 ͝ѫࡰɾߨࢣࣗݾ঺հ n ϋϯζΦϯηϛφʔ .BDLFSFMฤɾߨࢣ l גࣜձࣾ͸ͯͳ .BDLFSFMηʔϧεΤϯδχΞ

    Ҫ্ େีʢJEBLOPXʣ n ςΟʔνϯάΞγελϯτ l גࣜձࣾ͸ͯͳ .BDLFSFMηʔϧεσϕϩούʔ ߥ୩ ᠳʢJETIBSBUBOJʣ
  2. 4 / 61 ΞδΣϯμʢ.BDLFSFMฤʣ  ͸͡Ίʹ  ؂ࢹର৅αʔόʔͱ .BDLFSFMͷ४උ 

    ΤʔδΣϯτͷΠϯετʔϧɾىಈɾ(6*ͷ֬ೝ  ؂ࢹͷઃఆɾΞϥʔτͷ֬ೝ ˠ ϋϯζΦϯɾ5XJMJP ฤ ΁
  3. 5 / 61 ΞδΣϯμʢ.BDLFSFMฤʣ  ͸͡Ίʹ  ؂ࢹର৅αʔόʔͱ .BDLFSFMͷ४උ 

    ΤʔδΣϯτͷΠϯετʔϧɾىಈɾ(6*ͷ֬ೝ  ؂ࢹͷઃఆɾΞϥʔτͷ֬ೝ ˠ ϋϯζΦϯɾ5XJMJP ฤ ΁
  4. 7 / 61 ͳͥαʔόʔ؂ࢹ͕ඞཁ͔ʁ l ͍ͪૣ͘ো֐ൃੜΛ֬ೝͰ͖ΔΑ͏ʹ͢ΔͨΊ l ෮چʹ͍ͪૣ͘औΓֻ͔ΕΔΑ͏ʹ͢ΔͨΊ l ঢ়گͷมԽΛ࣌ܥྻͰ؅ཧ͢Δ͜ͱͰɺΩϟύγςΟϓϥϯχϯά΍

    ো֐ͷ༧ஹͷ೺Ѳʹ໾ཱͯΔͨΊ *5αʔϏε͕ద੾ʹఏڙ͞Ε͍ͯΔɾ͞Ε͍ͯ͘ ঢ়ଶΛ҆ఆతʹҡ࣋͢ΔͨΊʹ ඞཁෆՄܽͳ΋ͷʂ
  5. 9 / 61 ಛ௕ᶃ 4BB4ܕͷαʔόʔ؂ࢹαʔϏε n 4PGUXBSFBTB4FSWJDF l Πϯλʔωοτܦ༝ͰඞཁͳػೳΛར༻Ͱ͖Δ࢓૊ΈͰͷ αʔϏεͷఏڙΛ͍ͯ͠Δ΋ͷ

    n ϝϦοτ l ϑϧϚωʔδυͷͨΊɺϝϯςφϯεෆཁ l ίΞࣄۀ΁ͷूதΛࢧԉʂ n σϝϦοτ l Πϯλʔωοτʹ઀ଓͰ͖ͳ͍ͱར༻Ͱ͖ͳ͍έʔε͕ଟ͍
  6. 16 / 61 ༷ʑͳศརͳػೳɾಛ௕ l "84ΠϯςάϨʔγϣϯ l 63-֎ܗ؂ࢹ l ϓϥάΠϯػߏʹΑΔ෯޿͍؂ࢹ߲໨΁ͷରԠ

    l ϗετʹඥ෇͔ͳ͍਺஋ͷՄࢹԽʢαʔϏεϝτϦοΫʣ l ΞϧΰϦζϜͷ׆༻ʹΑΔӡ༻ࢧԉ
  7. 24 / 61 ΞδΣϯμʢ.BDLFSFMฤʣ  ͸͡Ίʹ  ؂ࢹର৅αʔόʔͱ .BDLFSFMͷ४උ 

    ΤʔδΣϯτͷΠϯετʔϧɾىಈɾ(6*ͷ֬ೝ  ؂ࢹͷઃఆɾΞϥʔτͷ֬ೝ ˠ ϋϯζΦϯɾ5XJMJP ฤ ΁
  8. 25 / 61 ϋϯζΦϯʹؔ͢Δ͓ئ͍ ʻ஫ҙࣄ߲΍͓ئ͍Ͱ͢ʼ  ίϚϯυྨ͸શͯ IUUQTNBDLFSFMJPIBOETPOUXJMJP ʹ ͝༻ҙ͍ͯ͠·͢ͷͰɺͥͻ͝ར༻Լ͍͞ɻ

     ෼͔Βͳ͍఺͕͋ͬͨΒɺԕྀͳ࣭͘໰͍ͯͩ͘͠͞ɻ • ͓ۙ͘ͷߨࢣɾ5"ʹ͓੠ֻ͚௖͍ͯ΋ 0,Ͱ͢ʂ • ॱ൪ʹରԠ͍ͨ͠·͢
  9. 27 / 61 αʔόʔͷ֬ೝ n ࢀՃऀͷΈͳ͞Μ֤ਓʹͻͱͭͣͭɺαʔόʔΛ͝༻ҙ͍ͯ͠·͢ • Ϋϥ΢υαʔόʔʢ"84&$ʣΛ࢖͍·͢ n ϩάΠϯͰ͖ͨΒɺʮϗετ໊ͷมߋʯ΋ߦͬͯΈ·͠ΐ͏

    • ʲखॱ̎ʳϗετ໊ʢαʔόʔ໊ʣͷมߋ • ʲ໊͓લʳIPTUʢྫɿ JOPVFIPTUʣ • ʲखॱ̏ʳϗετ໊ʢαʔόʔ໊ʣͷมߋΛ֬ೝ
  10. 28 / 61 ଓ͍ͯ .BDLFSFMͷ४උͰ͢ n ͦΕͰ͸ૣ଎ΞΧ΢ϯτͷ࡞੒ʂʜͷલʹ n .BDLFSFMʹ͓͚Δͭͷ֓೦ʹ͍ͭͯ •

    ΦʔΨχθʔγϣϯ • αʔϏε • ϩʔϧ n ͜ͷͭ͸Έͳ͞Μʹ΋࡞੒ͯ͠௖͘͜ͱʹͳΓ·͢
  11. 29 / 61 ΦʔΨχθʔγϣϯ n ௚༁͢Δͱʮ૊৫ʯ n جຊతʹ͸ʮ૊৫ʯ୯ҐͰ࡞੒ͯ͠௖͍ͯ໰୊͋Γ·ͤΜ n ҎԼͷ༷ͳಛ௃Λ཈্͑ͨͰɺద੾ͳཻ౓Ͱ࡞੒͠·͠ΐ͏

    • ಉҰΦʔΨχθʔγϣϯʹॴଐ͢Δϝϯόʔ͸ɺجຊతʹ͢΂ͯͷ ৘ใΛӾཡՄೳ • ʮϩʔϧʯʢͷͪ΄Ͳ͝঺հʣ୯ҐͰάϥϑΛ·ͱΊͯӾཡͰ͖Δ ͷ͸ಉҰΦʔΨχθʔγϣϯͷൣғ಺ͷΈ
  12. 34 / 61 ͦΕͰ͸͋ΒͨΊͯɺ.BDLFSFMͷ४උͰ͢ n IUUQTNBDLFSFMJPTJHOVQ ͔ΒΞΧ΢ϯτΛ࡞੒͠·͠ΐ͏ • ʲखॱ̐ʳ.BDLFSFMͷΞΧ΢ϯτΛ࡞੒ʢαΠϯΞοϓʣ •

    ˞طʹΞΧ΢ϯτΛ͓࣋ͪͷํ͸͓஌Β͍ͤͩ͘͞ n ΦʔΨχθʔγϣϯ໊ΛܾΊ·͠ΐ͏ • ʲ໊͓લʳPSHʢྫɿJOPVFPSHʣ • ͜ͷΦʔΨχθʔγϣϯʹͱͬͯͷ࠷ॳͷϢʔβʔɿ͋ͳͨ • ؅ཧऀϢʔβʔɿ͋ͳͨ
  13. 37 / 61 ΞδΣϯμʢ.BDLFSFMฤʣ  ͸͡Ίʹ  ؂ࢹର৅αʔόʔͱ .BDLFSFMͷ४උ 

    ΤʔδΣϯτͷΠϯετʔϧɾىಈɾ(6*ͷ֬ೝ  ؂ࢹͷઃఆɾΞϥʔτͷ֬ೝ ˠ ϋϯζΦϯɾ5XJMJP ฤ ΁
  14. 38 / 61 ΤʔδΣϯτʢNBDLFSFMBHFOUʣͷΠϯετʔϧͱىಈ n ΦʔΨχθʔγϣϯͷ࡞੒׬ྃޙʹදࣔ͞Ε͍ͯΔը໘ʹैͬͯɺ ࡞ۀΛਐΊͯΈ͍ͯͩ͘͞ • ΤʔδΣϯτʢNBDLFSFMBHFOUʣͷΠϯετʔϧ •

    ΤʔδΣϯτʢNBDLFSFMBHFOUʣͷઃఆ • ΤʔδΣϯτʢNBDLFSFMBHFOUʣͷىಈ n ͸΍͘Ͱ͖ͨํ͸ɺ͍Ζ͍Ζͳը໘΍άϥϑΛݟͯɾ৮ͬͯΈ͍ͯͩ͘͞ • ʲखॱ̑ʳάϥϑΛ֬ೝ͢Δ
  15. 40 / 61 αʔϏεͱϩʔϧ΁ͷॴଐ n αʔόʔʢϗετʣΛαʔϏεɾϩʔϧʹॴଐͤͯ͞Έ·͠ΐ͏ l ϗετҰཡʢ)PTUTʣ͔Β • αʔϏε໊ϩʔϧ໊

    • ˞ࢀߟ˞αʔϏε໊ͱϩʔϧ໊ΛઃఆϑΝΠϧʹॻ͍͓ͯ͘ ͜ͱͰɺࣗಈతʹॴଐͤ͞Δ͜ͱ΋ՄೳͰ͢
  16. 41 / 61 .BDLFSFMͷը໘ΛோΊͯΈ·͠ΐ͏ n ؅ཧը໘ΛҰ௨Γݟ͍͖ͯ·͠ΐ͏ • ΦʔΨχθʔγϣϯτοϓϖʔδ • %BTICPBSET

    • 0WFSWJFX • )PTUT • γεςϜϝτϦοΫ • 4FSWJDFT • ϩʔϧάϥϑ • .POJUPST • "MFSUT
  17. 43 / 61 ΞδΣϯμʢ.BDLFSFMฤʣ  ͸͡Ίʹ  ؂ࢹର৅αʔόʔͱ .BDLFSFMͷ४උ 

    ΤʔδΣϯτͷΠϯετʔϧɾىಈɾ(6*ͷ֬ೝ  ؂ࢹͷઃఆɾΞϥʔτͷ֬ೝ ˠ ϋϯζΦϯɾ5XJMJP ฤ ΁
  18. 50 / 61 ˞ิ଍˞ ϝτϦοΫʹ͍ͭͯ n γεςϜϝτϦοΫ l NBDLFSFMBHFOU͕ඪ४Ͱૹ৴͢Δ΋ͷ •

    $16 • .FNPSZ • 'JMFTZTUFN • ʜ n ΧελϜϝτϦοΫ l ެࣜϓϥάΠϯͳͲͰΤʔδΣϯτͷػೳΛ֦ு͠ૹ৴͢Δ΋ͷ • .Z42-ʹؔ͢ΔϝτϦοΫ • "QBDIFʹؔ͢ΔϝτϦοΫ • ʜ
  19. 51 / 61 $16ෛՙঢ়گͷ֬ೝ n άϥϑͰݟΔ $16࢖༻཰ͷਪҠ͸͍͔͕Ͱ͠ΐ͏͔ʁ l ͖͞΄Ͳ࡞੒ͨ͠؂ࢹϧʔϧͷᮢ஋͸ӽ͑ͨʁ n

    ଞͷมԽ͸Ͳ͏Ͱ͠ΐ͏͔ʁ l "MFSUTλϒͷ֬ೝ • ʲखॱ̓ʳΞϥʔτλϒΛ֬ೝͯ͠ΈΔ l ϝʔϧϘοΫεͷ֬ೝ
  20. 57 / 61 ਖ਼ৗͳঢ়ଶʹ෮ؼ͢Δͱʁ n Φʔϓϯʢىථʣ͞ΕͨΞϥʔτ͕ࣗಈతʹΫϩʔζ͞Ε·͢ l ͜Ε΋ .BDLFSFMͷػೳͰ͢ n

    ࠶ͼ௨஌ʢϝʔϧʣ΋ड৴͠·ͨ͠ l ᮢ஋ʹର͢Δঢ়ଶͷมԽͷλΠϛϯάͰ௨஌Λߦ͍·͢ • ʲ0,ʳˠʲ$SJUJDBMʳ ˠʲ0,ʳ • ʲ0,ʳˠʲ8BSOJOHʳ ˠʲ$SJUJDBMʳ ˠʲ0,ʳ
  21. 58 / 61 ΞδΣϯμʢ.BDLFSFMฤʣ  ͸͡Ίʹ  ؂ࢹର৅αʔόʔͱ .BDLFSFMͷ४උ 

    ΤʔδΣϯτͷΠϯετʔϧɾىಈɾ(6*ͷ֬ೝ  ؂ࢹͷઃఆɾΞϥʔτͷ֬ೝ ˠ ϋϯζΦϯɾ5XJMJP ฤ ΁