Pro Yearly is on sale from $80 to $50! »

OpenCensus による APM の実現と、未来 / Implementing APM with OpenCensus

73e67f6da1838e3498c00f33cb0309e3?s=47 Yuichi Saito
November 25, 2018

OpenCensus による APM の実現と、未来 / Implementing APM with OpenCensus

Go Conference 2018 Autumn
https://gocon.jp/

73e67f6da1838e3498c00f33cb0309e3?s=128

Yuichi Saito

November 25, 2018
Tweet

Transcript

  1. ©2018 Wantedly, Inc. 0QFO$FOTVTʹΑΔ
 "1.ͷ࣮ݱͱɺະདྷ @munisystem 25.Nov.2018 Go Conference Autumn

  2. ©2018 Wantedly, Inc. Yuichi Saito @munisystem Infrastructure team / Wantedly,

    Inc. @XIPBNJ
  3. ©2018 Wantedly, Inc. લఏɿ
 ͳͥΞϓϦέʔγϣϯͷύϑΥʔϚϯεΛ
 ؾʹ͢Δඞཁ͕͋Δͷ͔

  4. ©2018 Wantedly, Inc. ͳͥͳΒϢʔβͷମݧ͕αʔϏεͷ੒௕ʹେ͖͘Өڹ͢Δ͔Β ମݧ͕ѱ͍ͱϢʔβ͸αʔϏε͔Β཭Εͯ͠·͏
 ମݧ͕ྑ͍ͱϢʔβ͸αʔϏεΛΑΓ࢖ͬͯ͘ΕΔ ͜ͷϢʔβͷମݧͱ ΞϓϦέʔγϣϯͷύϑΥʔϚϯε͸ີ઀ͳؔ܎ʹ͋Δ

  5. ©2018 Wantedly, Inc. ΞϓϦέʔγϣϯͷύϑΥʔϚϯε͕
 αʔϏεʹѱ͍ӨڹΛ༩͑Δྫ Our experiments demonstrate that slowing

    down the search results page by 100 to 400 milliseconds has a measurable impact on the number of searches per user of -0.2% to -0.6% 
 (averaged over four or six weeks depending on the experiment).
 That's 0.2% to 0.6% fewer searches for changes under half a second! Speed Matters - Google AI Blog ref. https://ai.googleblog.com/2009/06/speed-matters.html
  6. ©2018 Wantedly, Inc. The result of rebuilding our pages for

    performance led to a 40 percent decrease in Pinner wait time, a 15 percent increase in SEO traffic
 and a 15 percent increase in conversion rate to signup. Driving user growth with performance improvements - Pinterest Engineering Blog ref. https://medium.com/@Pinterest_Engineering/driving-user-growth-with-performance-improvements-cfc50dafadd7 ΞϓϦέʔγϣϯͷύϑΥʔϚϯε͕
 αʔϏεʹྑ͍ӨڹΛ༩͑Δྫ
  7. ©2018 Wantedly, Inc. "1.ͱ͸ͳʹ͔

  8. ©2018 Wantedly, Inc. "1."QQMJDBUJPO1FSGPSNBODF.BOBHFNFOUͱ͸ ཁٻ͞Ε͍ͯΔαʔϏεϨϕϧΛҡ࣋͢ΔͨΊʹΞϓϦέʔγϣϯͷ ύϑΥʔϚϯεͷܧଓతͳ؂ࢹͱ؅ཧΛߦͳ͏͜ͱ

  9. ©2018 Wantedly, Inc. "1.ͷ࣮ݱͷͨΊʹඞཁͳ͜ͱ  ύϑΥʔϚϯεٴͼͦͷվળʹඞཁͳσʔλͷऔಘ˔  औಘͨ͠σʔλΛՄࢹԽɺ׆༻Ͱ͖Δج൫ͷߏங˔ ˔ΞϓϦέʔγϣϯϨΠϠͷ੹຿ ˔$MPVE1SPWJEFS*OGSBTUSVDUVSFͷ੹຿

  10. ©2018 Wantedly, Inc. "1.ͰऔΓѻ͏୅දతͳσʔλ ‣ 5SBDJOH ‣ SFTQPOTFUJNF ‣ .FUSJDT

    ‣ 31.SFTPVSDFVTBHFOFUXPSLMBUFODZ ‣ -PHHJOH ‣ &SSPSSFQPSUJOH
  11. ©2018 Wantedly, Inc. Ͱ͸(PͰ"1.ΛͲ͏΍࣮ͬͯݱ͍ͯ͠Δ͔

  12. ©2018 Wantedly, Inc. Α͘࿩ʹฉ͘ߏ੒ ‣ 5SBDJOH ‣ 4UBDLESJWFS5SBDF%BUBEPH"1.;JQLJO+BFHFS ‣ .FUSJDT

    ‣ 4UBDLESJWFS.POJUPSJOH%BUBEPH1SPNFUIFVT ‣ -PHHJOH ‣ [BQHMPH GMVFOUE ‣ &SSPSSFQPSUJOH ‣ )POFZCBEHFS4FOUSZ
  13. ©2018 Wantedly, Inc. Α͘࿩ʹฉ͘ߏ੒ ‣ 5SBDJOH ‣ 4UBDLESJWFS5SBDF%BUBEPH"1.;JQLJO+BFHFS ‣ .FUSJDT

    ‣ 4UBDLESJWFS.POJUPSJOH%BUBEPH1SPNFUIFVT ‣ -PHHJOH ‣ [BQHMPH GMVFOUE ‣ &SSPSSFQPSUJOH ‣ )POFZCBEHFS4FOUSZ
  14. ©2018 Wantedly, Inc. ίʔυϕʔεͱج൫͕ີ݁߹ͯ͠͠·͏

  15. ©2018 Wantedly, Inc. ίʔυϕʔεͱج൫͕ີʹͳΔ͜ͱͷ໰୊఺ "1.ͷج൫ͱͯ͠ԿΛ࠾༻͢Δ͔͸ɺαʔϏε΍૊৫ͷن໛ͰมΘΔ ΋͠ج൫Λมߋ͠Α͏΋ͷͳΒɺ طଘͷϥΠϒϥϦ΍ίʔυϕʔεʹେ͖͘खΛՃ͑Δඞཁ͕͋Δ

  16. ©2018 Wantedly, Inc. ΞϓϦέʔγϣϯΤϯδχΞ͸ ج൫ʹԿ͕࢖ΘΕΔͷ͔ΛҙࣝͤͣίʔυΛ͔͚Δ΂͖ ΦϖϨʔγϣϯ͸ ίʔυϕʔεΛҙࣝ͢Δ͜ͱͳ͘ αʔϏε΍૊৫ʹ࠷దͳج൫ͷߏஙɺӡ༻͕ߦ͑Δ΂͖

  17. ©2018 Wantedly, Inc. 0QFO$FOTVT

  18. ©2018 Wantedly, Inc. 0QFO$FOTVTͱ͸ "1.ʹඞཁͳσʔλΛऩू͠ɺ
 ֎෦αʔϏεʹఏڙ͢ΔͨΊͷϑϨʔϜϫʔΫ (PPHMFࣾ಺ͷ$FOTVTͱݺ͹ΕΔϥΠϒϥϦΛ044Խͨ͠΋ͷ

  19. ©2018 Wantedly, Inc. "1.࣮૷ڞ௨ԽͷΞϓϩʔν ref. https://github.com/census-instrumentation/opencensus-specs/blob/master/drawings/EcosystemLayers.png

  20. ©2018 Wantedly, Inc. "1.࣮૷ڞ௨ԽͷΞϓϩʔν exporter collector exporter collector Library Library

    Backend Library Data flow
  21. ©2018 Wantedly, Inc. "1.࣮૷ڞ௨ԽͷΞϓϩʔν σʔλͷऩू DPMMFDUPS ͱɺม׵ૹ৴ FYQPSUFS ͷ෼཭ ‣

    $MPVE1SPWJEFS͸FYQPSUFS͚࣮ͩ૷͢Δ ‣ ΞϓϦέʔγϣϯ͸σʔλΛऩू͢Δ෦෼Λ࣮૷͢Δ ‣ ૹ৴͢ΔσʔλΛ࡞੒͢ΔXSBQQFSMJCSBSZͷར༻ ‣ खಈͰσʔλͷ࡞੒Λߦͳ͏
  22. ©2018 Wantedly, Inc. 0QFO$FOTVT͕ऩू͢Δσʔλ ‣ 5SBDJOH ‣ SFTQPOTFUJNF ‣ .FUSJDT

    ‣ 31.SFTPVSDFVTBHFOFUXPSLMBUFODZ ‣ -PHHJOH ‣ &SSPSSFQPSUJOH
  23. ©2018 Wantedly, Inc. (P 0QFO$FOTVTʹΑΔ"1.ͷ࣮૷ྫ

  24. ©2018 Wantedly, Inc. Tracing

  25. ©2018 Wantedly, Inc. Tracing

  26. ©2018 Wantedly, Inc. Metrics

  27. ©2018 Wantedly, Inc. If you want to change backend

  28. ©2018 Wantedly, Inc. 0QFO$FOTVTͷܽ఺ όοΫΤϯυͱσʔλऩूͷ݁߹౓ΛԼ͛ͨ͜ͱͰɺ
 όοΫΤϯυݻ༗ͷ࠷దԽͷͨΊͷϝλσʔλͷ෇༩͕ߦ͑ͳ͍ ҰൠతͳVTFDBTFʹର͢Δڞ௨Խɺ ϥΠϒϥϦ࣮૷ͷ֦ுʹର͢Δ࢓༷͕ඞཁ

  29. ©2018 Wantedly, Inc. 0QFO$FOTVTʹΑΔ"1.ͷະདྷ

  30. ©2018 Wantedly, Inc. 0QFO$FOTVT4FSWJDFʹΑΔFYQPSUFSͷ෼཭ 0QFO$FOTVT4FSWJDF͸σʔλΛΞϓϦέʔγϣϯ͔Βड͚औΔ
 "HFOUͱ"HFOU͔Βड͚औͬͨσʔλΛ όοΫΤϯυʹૹΔͨΊͷ$PMMFDUPSͷͭͷίϯϙʔωϯτʹΑΔ $PMMFDUPSଆʹόοΫΤϯυͷFYQPSUFSΛQMVHJOͷܗͰ
 ઃఆ͢Δ͜ͱͰɺίʔυϕʔεͱόοΫΤϯυͷ݁߹౓ΛԼ͛Δ

  31. ©2018 Wantedly, Inc. 0QFO$FOTVT4FSWJDFʹΑΔFYQPSUFSͷ෼཭ ref, https://user-images.githubusercontent.com/10536136/46637070-65f05f80-cb0f-11e8-96e6-bc56468486b3.png

  32. ©2018 Wantedly, Inc. -PHHJOH4VQQPSU ΞϓϦέʔγϣϯͷϩάʹUSBDFͷ৘ใΛຒΊࠐΈɺ
 σόοάΛΑΓ͠΍͘͢͢ΔҙਤͰಋೖ͕ݕ౼͞Ε͍ͯΔ [BQ΍HMPHͳͲͷXSBQQFSͱͯ͠ಇ͘ ref. https://github.com/census-instrumentation/opencensus-specs/issues/130

  33. ©2018 Wantedly, Inc. ·ͱΊ

  34. ©2018 Wantedly, Inc. 0QFO$FOTVTΛ࢖͏͜ͱͰɺ
 ίʔυϕʔεͱج൫ͷґଘΛۃྗͳͨ͘͠"1.ͷ࣮ݱ͕ՄೳʹͳΔ ϕϯμʔʹґଘ͠ͳ͍࣮૷ʹΑΓɺ "1.͸͞ΒͳΔFDPTZTUFNͷ੒௕Λ਱͛ΔͩΖ͏ ref. https://github.com/census-instrumentation/opencensus-specs/issues/130