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

NewRelicと戦うレガシーPHP

uzulla
March 16, 2022

 NewRelicと戦うレガシーPHP

意識低いテクです
at: NRUG (New Relic User Group) Vol.2
when: 2022/03/16
by: @uzulla

uzulla

March 16, 2022
Tweet

More Decks by uzulla

Other Decks in Programming

Transcript

  1. E_USER_WARNING(౳)Λ࢖͏ trigger_error( "This code is NOT DEAD", E_USER_WARNING ); •

    https://www.php.net/manual/ja/function.trigger-error.php • ϢʔβʔϨϕϧͷΤϥʔ/ܯࠂ/௨஌ϝοηʔδΛੜ੒͢Δ
  2. ิ଍ɿE_USER_*ͱ͸ʁ • PHPʹ͸ྫ֎ʹࣅͨ(?) ผͷΤϥʔػߏ͕͋Δ • DB઀ଓࣦഊE_WARNINGͱ͔ɺΑ͘Έ·͢ΑͶʢന໨ʣ • E_USER_* ͸ɺϢʔβʔ͕ൃߦͰ͖ΔΤϥʔܕ •

    DEPRECATED, NOTICE, WARNING, ERROR,ͷ4छ • WARN·Ͱ͸࣮ߦ͕ࢭ·Βͳ͍ (͜ͱ͕׆༻ͷϛι̍) • display_errors=offͰӅͤΔ (͜ͱ͕׆༻ͷϛι̎)