بنقرة واحدة
layer-11-apm
Expert knowledge for APM (Observability) Layer modeling in Documentation Robotics
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Expert knowledge for APM (Observability) Layer modeling in Documentation Robotics
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Expert knowledge for Data Store Layer modeling in Documentation Robotics
Graph-based code intelligence for using dr analyzer subcommands to understand codebase structure, discover elements, and verify model alignment
Expert knowledge for Application Layer modeling in Documentation Robotics
Expert knowledge for Motivation Layer modeling in Documentation Robotics
Expert knowledge for Business Layer modeling in Documentation Robotics
Expert knowledge for Security Layer modeling in Documentation Robotics
| name | LAYER_11_APM |
| description | Expert knowledge for APM (Observability) Layer modeling in Documentation Robotics |
| triggers | ["APM","observability","monitoring","metrics","spans","traces","logs","OpenTelemetry","telemetry"] |
| version | 0.8.3 |
Layer Number: 11 Specification: Metadata Model Spec v0.8.3 Purpose: Defines observability using OpenTelemetry 1.0+, specifying traces, metrics, logs, and instrumentation.
The APM Layer captures application performance monitoring:
This layer uses OpenTelemetry 1.0+ (industry standard for observability).
Central Entity: The Span (unit of work in trace) is the core modeling unit.
Before extracting APM elements, verify what level of observability the codebase ACTUALLY implements. Do not model aspirational instrumentation.
grep "@opentelemetry" package.json
If NO OTel SDK found:
MetricInstrument, Span, TraceConfiguration, or ExporterConfig elements as if they are implementedLogConfiguration), UI-displayed metrics (describe in element description that export is absent)provenance: inferred and add a note in the description: "Metric concept identified; no OTel export implemented."If OTel SDK IS found:
Even without OTel, codebases may have:
apm.logconfigurationapm.metricinstrument (with note: display-only, not exported)apm.instrumentationconfig (type: manual)apm.metricinstrument (inferred, note: in-memory only)| Pattern | Model as | provenance |
|---|---|---|
console.error() logging | logconfiguration | extracted |
| UI badge showing token count | metricinstrument (note: display-only) | inferred |
| Store tracks reconnection count | metricinstrument (note: in-memory only) | inferred |
opentelemetry.createCounter() | metricinstrument | extracted |
| Prometheus export endpoint | exporterconfig | extracted |
CLI Introspection: Run
dr schema types apmfor the authoritative, always-current list of node types. Rundr schema node <type-id>for full attribute details on any type.
| Entity Type | Description |
|---|---|
| TraceConfiguration | Distributed tracing configuration |
| Span | Unit of work in distributed trace |
| SpanEvent | Timestamped event within span |
| SpanLink | Link between spans from different traces |
| MetricConfiguration | Metrics collection configuration |
| MetricInstrument | Specific metric instrument (Counter, Gauge, Histogram, etc.) |
| LogConfiguration | Structured logging configuration |
| LogRecord | Individual log record |
| LogProcessor | Log processing pipeline step (simple, batch, custom) |
| Resource | Telemetry resource attributes |
| InstrumentationScope | Scope of instrumentation |
| InstrumentationConfig | Code instrumentation configuration (library, auto/manual type) |
| ExporterConfig | Telemetry exporter configuration (OTLP, Jaeger, Prometheus, etc.) |
| Alert | Alert rule with severity, condition, and notification channels |
| Dashboard | Monitoring dashboard definition (Grafana, Datadog, etc.) |
Use this decision tree before assigning a type to any APM element.
apm.alertapm.dashboardapm.exporterconfigapm.instrumentationconfigapm.instrumentationscopeapm.logconfigurationapm.logprocessorapm.logrecordapm.metricconfigurationapm.metricinstrumentapm.resourceapm.spanapm.spaneventapm.spanlinkapm.traceconfigurationActivate when the user:
Outgoing (APM → Other Layers):
instrumented-service → Application Layer (which service is being monitored?)business-metrics → Business Layer (business KPIs)Incoming (Other Layers → APM):
# Add span
dr add apm span "Process Order"
# Add metric instrument
dr add apm metricinstrument "order_rate" --description "Order processing rate counter"
# Add log record
dr add apm logrecord "Error Log"
# List APM elements
dr list apm --type span
# Validate APM layer
dr validate --layers apm
# Export APM configuration
dr export markdown --layers apm
id: apm.span.process-order
name: "Process Order Span"
type: span
properties:
traceId: "4bf92f3577b34da6a3ce929d0e0e4736"
spanId: "00f067aa0ba902b7"
traceState: ""
parentSpanId: "b9c7c989f97918e1"
spanKind: INTERNAL
startTimeUnixNano: "1544712660000000000"
endTimeUnixNano: "1544712661000000000"
droppedAttributesCount: 0
droppedEventsCount: 0
droppedLinksCount: 0
statusCode: OK
attributes:
order.id: "ord-12345"
order.total: 99.99
customer.id: "cust-67890"
id: apm.metricinstrument.order-rate
name: "Order Rate Metric"
type: metricinstrument
properties:
type: Counter
unit: orders
description: "Number of orders processed per minute"
enabled: true
Before declaring APM layer extraction complete, verify each type was considered:
apm.alert — Alert rule with severity and notification channelsapm.dashboard — Monitoring dashboard (Grafana, Datadog, etc.)apm.exporterconfig — Telemetry exporter configuration (OTLP, Prometheus, etc.)apm.instrumentationconfig — Code instrumentation configurationapm.instrumentationscope — Instrumentation scope (library version and schema URL)apm.logconfiguration — Logging configuration per serviceapm.logprocessor — Log processing pipeline stepapm.logrecord — Individual structured log recordapm.metricconfiguration — Metrics collection configuration per serviceapm.metricinstrument — Specific metric instrument (Counter, Gauge, Histogram, etc.)apm.resource — Telemetry resource attributes (service name, environment)apm.span — Unit of work in a distributed traceapm.spanevent — Timestamped event within a spanapm.spanlink — Link between spans from different tracesapm.traceconfiguration — Distributed tracing configurationIf any type has ZERO elements, explicitly decide: "This type doesn't apply to this codebase" with reasoning.