Distributed Tracing with OpenCensus at Wantedly, Inc.

Distributed Tracing with OpenCensus at Wantedly, Inc.

73e67f6da1838e3498c00f33cb0309e3?s=128

Yuichi Saito

April 03, 2019
Tweet

Transcript

  1. 1.

    ©2018 Wantedly, Inc. Distributed Tracing with OpenCensus at Wantedly, Inc.

    OpenCensus meetup vol.1 03.Apr.2019 - @munisystem
  2. 5.

    ©2018 Wantedly, Inc. 8BOUFEMZʹ͓͚Δ.JDSPTFSWJDFTͷݱঢ় w 1PMZHMPU w 3VCZͱ(P͕ϝΠϯ w αʔϏεͷυϝΠϯʹΑͬͯ1ZUIPO΍/PEFɺ3VTU΋࠾༻

    w .VMUJ$MPVE w "84 ,VCFSOFUFTPO&$ 3%4 &MBTUJDBDIF ʜ  w ($1 #JH2VFSZ $MPVE%BUBTUPSF $MPVE1VC4VC ʜ
  3. 8.

    ©2018 Wantedly, Inc. ύϑΥʔϚϯεܭଌͷ೉͠͞ w 8BOUFEMZͰ͸"1.ͷج൫ͱͯ͠/FX3FMJDΛ࠾༻͍ͯͨ͠ w SVOUJNFϨϕϧͰͷϝτϦΫεͷऩू w -BUFODZ

    4UBDLUSBDF ($IFBQTJ[F ʜ w .JDSPTFSWJDFTͰ͸αʔϏεؒͷσʔλͷ΍ΓऔΓ͕ωοτϫʔΫӽ͠ʹߦΘΕΔ w ϦΫΤετઌͰͲΜͳॲཧ͕ߦΘΕ͍ͯΔͷ͔Λ൑அͰ͖ͳ͍
  4. 9.

    ©2018 Wantedly, Inc. ύϑΥʔϚϯεܭଌͷ೉͠͞ Receive A /api/products/1 timeline DB Access

    Request B /api/reviews/1 #Ͱͳʹ͕ߦΘΕ͍ͯΔͷ͔͸"ͷ4UBDL5SBDF্͔Β͸൑அͰ͖ͳ͍
  5. 10.

    ©2018 Wantedly, Inc. ύϑΥʔϚϯεܭଌͷ೉͠͞ w 8BOUFEMZͰ͸"1.ͷج൫ͱͯ͠/FX3FMJDΛ࠾༻͍ͯͨ͠ w SVOUJNFϨϕϧͰͷϝτϦΫεͷऩू w -BUFODZ

    4UBDLUSBDF ($IFBQTJ[F ʜ w .JDSPTFSWJDFTͰ͸αʔϏεؒͷσʔλͷ΍ΓऔΓ͕ωοτϫʔΫӽ͠ʹߦΘΕΔ w ϦΫΤετઌͰͲΜͳॲཧ͕ߦΘΕ͍ͯΔͷ͔Λ൑அͰ͖ͳ͍ ‎෼ࢄτϨʔγϯάͷಋೖ
  6. 14.

    ©2018 Wantedly, Inc. Կނ0QFO$FOTVTΛ࠾༻ͨ͠ͷ͔ w ͲͪΒ΋࣮૷ΛϕϯμʔΛ෼཭͢Δͱ͍͏໨త͸Ұॹ w ෼ࢄτϨʔγϯάҎ֎ͷར༻Ձ஋Λߟ͑ͨ w 0QFO5SBDJOH͸෼ࢄτϨʔγϯά͚ͩͰ͋Δͷʹର͠ɺ


    0QFO$FOTVT͸0CTFSWBCJMJUZશൠʹϑΥʔΧε͍ͯ͠Δ w ΞϓϦέʔγϣϯͷϝτϦΫεͷऩूΛݟਾ͑ͨ w ΤίγεςϜͷ੒௕ͷݟࠐΈ w (PPHMF͸4UBDLESJWFSͰ0QFO$FOTVTͷར༻Λਪ঑͍ͯͨ͠
  7. 16.

    ©2018 Wantedly, Inc. ෼ࢄτϨʔγϯάͷόοΫΤϯυ w όοΫΤϯυʹ͸%BUBEPH"1.ͱ4UBDLESJWFS5SBDFΛ࠾༻ w %BUBEPH"1.͕ϝΠϯ w ΋ͱ΋ͱ%BUBEPHΛར༻͍ͯͨ͠ͱ͍͏എܠ

    w %BUBEPH"1.Ͱ͸ಛఆͷ؀ڥ͚ͩ͢΂ͯͷ5SBDFΛ࢒͢ࣄ͕Ͱ͖ͳ͍ w ͜ΕΛ୲อ͢ΔͨΊʹ4UBDLESJWFS5SBDFͱซ༻͍ͯ͠Δ w কདྷతʹ͸όοΫΤϯυΛ౷Ұͤ͞Δ
  8. 17.

    ©2018 Wantedly, Inc. 4IBSFE-JCSBSZʹΑΔڞ௨Խ w ࣾ಺ʹ͸ϚΠΫϩαʔϏεʹඞཁͳϩδοΫΛ֤αʔϏεʹఏڙ͢ΔͨΊͷ
 ڞ௨Խ࣮૷͕ଘࡏ͍ͯͨ͠ w 5JNFPVU3FUSZ"VUIFOUJDBUPO-PHHJOH w

    ෼ࢄτϨʔγϯάͷ࣮૷΋͜Εʹ಺แ͍ͤͯ͞Δ w 3VCZͱ(PͷΈͰఏڙ w 1ZUIPO΍ͦͷଞͷݴޠ͸ϦΫΤετͷ຤୺Ͱར༻͞ΕΔέʔε͕ଟ͍ w ߋʹ%#΁ͷSFBEXSJUF΋΄΅ແ͍ w VQTUSFBN΁ͷϦΫΤετͷ4QBO͚ͩͰ͋Δఔ౓൑அ͕Մೳ
  9. 18.

    ©2018 Wantedly, Inc. ར༻͍ͯ͠Δ-JCSBSZ w (Pʹؔͯ͠͸ެࣜͷ΋ͷΛར༻ w 3VCZ͸GPSL IUUQTHJUIVCDPNXBOUFEMZPQFODFOTVTSVCZ Λར༻

    w ౰࣌UPQMFWFMͷ4QBO͕ࢠ4QBOʹ఻ൖ͞Εͳ͍ͱ͍͏க໋తͳόά͕͋ͬͨ w 13Λૹ͕ͬͨɺϝϯςφෆࡏͰϦϦʔε͞Εͳ͍࠷ۙϚʔδ͞Εͨ w UPQMFWFM4QBOʹ"UUSJCVUFΛࠩ͠ࠐΉͨΊͷIPPLΛࣗ࡞͍ͯͯ͠ɺ
 ͦΕ͕·ͩຊମʹ13Λग़͍ͯ͠ͳ͍ w %BUBEPHͷ&YQPSUFSʹؔͯ͠͸ࣗ࡞ w IUUQTHJUIVCDPNNVOJTZTUFNPQFODFOTVTEBUBEPH
  10. 26.

    ©2018 Wantedly, Inc. ΞϓϦέʔγϣϯίʔυͱϕϯμʔͷ׬શͳ෼཭ w &YQPSUFS͸ίʔυʹґଘ w ϥΠϒϥϦͷΞοϓσʔτͷ೉͠͞ w 1PMZHMPUͱ&YQPSUFS࣮૷

    w ओཁͳݴޠ͚࣮ͩ૷͢Δͷ΋ݱ࣮తͰ͸ͳ͍ w &YQPSUFSͷࣗ࡞ͱ͍͏બ୒ࢶ w ϕϯμʔଆͷػೳ΁ͷ௥ैͷίετ
  11. 29.

    ©2018 Wantedly, Inc. ·ͱΊ w 0QFO$FOTVTΛ෼ࢄτϨʔγϯάͰར༻͢ΔϝϦοτ w ϕϯμʔͱίʔυͷ෼཭ͷ࣮ݱ w ϩά΍ϝτϦΫεͷऩू΁ͷ֦ுੑ

    w ΤίγεςϜͷେ͖͞ w 8BOUFEMZ *ODʹ͓͚Δ෼ࢄτϨʔγϯά w 4IBSFE-JCSBSZʹΑΔ࣮૷ͷڞ௨Խ w ݕࡧͷͨΊͷϝλσʔλͷૹ৴