Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> Ruby

ActionMailer Magic Dashboard: ติดตาม Email แบบ Real-time สำหรับ Ruby on Rails

การ Monitor Application ของคุณอาจเป็น Difficult Task หากคุณเพิ่งเริ่มต้น คุณต้องรู้ว่า Metrics ไหนสำคัญที่สุด และเข้าใจว่าตัวไหนคุณสามารถ Combine เข้า Meaningful Graphs ได้

ในจิตวิญญาณ (ไม่ได้แค่ Holiday ⛄️) ของการทำให้สิ่งต่างๆ Smoother สำหรับ Users ของเรา เราได้ Add Magic Dashboard เข้า Ruby Integration ที่แสดง Volume ของ Emails ที่คุณส่งด้วย ActionMailer

Magic Dashboards

ระหว่าง Setup Process Agent ของเรา Scan App Infrastructure ของคุณ เมื่อมัน Figure Out ว่าคุณใช้ Tools ไหน มัน Automatically Instrument ส่วนบางส่วนของ App และ Instantly สร้าง Most Important Dashboards (เราเรียกว่า Magic Dashboards) ดังนั้นคุณสามารถ Monitor สิ่งที่สำคัญที่สุดด้วย 0 Setup Time

สำหรับ Ruby Integration เราจะ Setup Magic Dashboards ของคุณสำหรับ Background Jobs ผ่าน Sidekiq, Databases เหมือน Mongo, และ Web Servers เหมือน Puma

Making Things Easy สำหรับ Ruby on Rails Users

มัน Already Possible ที่จะ Monitor ว่ามี Email ส่งไปเท่าไหร่กับ Rails ผ่าน Namespace "background" บน AppSignal ที่คุณเห็นได้ว่า Specific Mailer ถูก Called บ่อยแค่ไหน

อย่างไรก็èques นี้ต้องการ Filtering ของ Background Jobs และยากที่จะได้ Sense ของประเภท Emails ที่ถูกส่ง เราตัดสินใจทำให้มัน Easier และ Detailed กว่านั้น ในกรณีของ AppSignal Monitoring AppSignal เอง มัน Important ที่จะ Monitor Email Traffic และ Nice ที่จะสามารถเห็น Distribution ระหว่าง Error, Performance และ Anomaly Detection Emails

ActionMailer Magic Dashboard ใน AppSignal

เมื่อ Update เป็น Latest Ruby Integration (2.11.1 หรือ Better) คุณจะเห็น Magic Dashboard ใหม่สำหรับ ActionMailer Metrics Dashboard นี้ช่วยให้คุณ Track จำนวนครั้งที่ Mailer เฉพาะถูก Called และเห็น Distribution ระหว่าง Mailers ต่างๆ ใน Application ของคุณ

ActionMailer Dashboard Plot ข้อมูลต่อไปนี้:

  • ActionMailer Deliveries Delivery Throughput ต่อ ActionMailer Class/Method (ตัวอย่าง Usermailer#welcome)
  • ActionMailer Deliveries Delivery Throughput Distribution แสดงเป็น Percentage ระหว่าง Mailers ต่างๆ

Graphs ถูก Split Out โดย ActionMailer Class/Method:

หากคุณ Already บน Ruby Integration 2.11.1 หรือ Better Magic Dashboard จะ Appear อัตโนมัติทันทีที่เรา Detect ActionMailer Calls ใหม่

Setting a Trigger เพื่อส่ง Alert

อีก Cool Thing ที่กลายเป็น Easy กับ Data ใน Graphs คือ Setting Triggers สำหรับมันและส่ง Alerts เมื่อ Triggered

ตัวอย่าง เมื่อ Throughput ไป Over หรือ Under Certain Threshold นี่คือสิ่งที่ควร Consider Setting Trigger สำหรับ เพื่อทำเช่นนั้น คลิก Three Dots บนขวาบนของ Graph และ Start Trigger Setup

ลอง AppSignal: Monitoring ทำง่ายและ Sweet 🍪

หากคุณยังไม่ได้ใช้ AppSignal มาก่อน ตอนนี้คุณรู้แล้วว่าเรา Save เวลาคุณโดยการทำ Monitoring ให้ง่ายขึ้น เราอยากให้คุณลองเรา เมื่อคุณลอง โปรด Feel Free to Reach Out เราจะส่งกล่อง Stroopwafels ฟรีให้ด้วย