الركائز: السجلات والمقاييس والتتبعات
استكشفوا الإشارات الثلاث المتميزة والمتكاملة لقابلية الرصد: السجلات والمقاييس والتتبعات. وافهموا نقاط قوة كل منها وكيفية عملها معًا
الركائز: السجلات والمقاييس والتتبعات درس مجاني في System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) على CoddyKit. هذا هو الدرس 2 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry)، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
Observability's Core Pillars
Observability rests on three pillars: logs, metrics, and traces. Each gives a different view, and together they paint a full picture of your system.
Logs: The Event Diary
Logs are your system's diary — text records of discrete events like a login or an error. They tell you exactly what happened and when.
What Logs Tell Us
Logs are gold for debugging and auditing. When something breaks, they hand you the error message, stack trace, and context right up to the failure.
Logs in Action (Code)
Even a print statement is a primitive log. Real apps use logging libraries for structure, but this snippet shows the basic idea of log output.
public class LogDemo {
public static void main(String[] args) {
System.out.println("INFO: Application started.");
int userCount = 10;
System.out.println("DEBUG: Current users: " + userCount);
// Imagine an error occurring here
System.out.println("ERROR: Failed to connect to database.");
}
}Metrics: Measuring Performance
Metrics are numbers measured over time — CPU, memory, request rate, error count. They tell you how much or how often, stored as time-series data.
Metrics for Trends & Health
Metrics reveal trends and health. A sudden request drop or CPU spike shows up instantly, making them perfect for spotting bottlenecks and firing alerts.
Metrics in Action (Concept)
Real metrics need libraries, but the core idea is simple: a counter that increments and gets reported periodically. This snippet sketches that out.
public class MetricDemo {
static int successfulRequests = 0;
static int failedRequests = 0;
public static void processRequest(boolean success) {
if (success) {
successfulRequests++;
} else {
failedRequests++;
}
// In a real system, these counts would be
// reported to a metrics system periodically.
}
public static void main(String[] args) {
processRequest(true);
processRequest(true);
processRequest(false);
System.out.println("Simulated request counts:");
System.out.println("Successful: " + successfulRequests);
System.out.println("Failed: " + failedRequests);
}
}Traces: Following a Request
A trace follows one request end-to-end across services. It's built from spans — each span an operation — revealing timing and relationships between components.
Traces for Distributed Systems
Traces are essential for microservices. When a request is slow, a trace pinpoints exactly which service or DB call caused the delay, even hops away.
Pillars: Stronger Together
The pillars are strongest together: traces show the path and timing, logs add context per span, metrics give aggregate trends. Correlate all three for the full view.
Check Your Understanding
Let's check what you've learned about the three pillars of observability.
Recap: The Observability Pillars
You've met all three pillars: logs for debugging, metrics for trends, traces for distributed request journeys. Next: why observability is so crucial today.
الأسئلة الشائعة
هل درس «الركائز: السجلات والمقاييس والتتبعات» مجاني؟
نعم — نص درس «الركائز: السجلات والمقاييس والتتبعات» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry)، انتقل إلى CoddyKit PRO. تتضمن دورة System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 4 دروس في المجموع.
ماذا ستتعلم في «الركائز: السجلات والمقاييس والتتبعات»؟
استكشفوا الإشارات الثلاث المتميزة والمتكاملة لقابلية الرصد: السجلات والمقاييس والتتبعات. وافهموا نقاط قوة كل منها وكيفية عملها معًا تتمرن على System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry)؟
لا تُشترط خبرة سابقة. System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 2 من أصل 4.
كم من الوقت يستغرق درس «الركائز: السجلات والمقاييس والتتبعات»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) هذا؟
نعم. كل درس في System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- ما هي قابلية رصد الأنظمة؟
- الركائز: السجلات والمقاييس والتتبعات
- لماذا تهم قابلية الرصد اليوم؟
- المراقبة مقابل قابلية الرصد: المعلوم والمجهول