Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Prefer lazily-initialized static metrics to avoid repeated label allocations on hot paths.
Metrics Shape
// Counter: things that only go up
metrics::counter!("http_requests_total", "method" => "GET", "route" => "/users/:id").increment(1);
// Histogram: latency distributions
metrics::histogram!("http_request_duration_seconds", "route" => "/users/:id").record(elapsed.as_secs_f64());
// Gauge: current state
metrics::gauge!("worker_queue_depth", "queue" => "emails").set(depth asf64);
Use route templates, not raw paths. Raw paths turn IDs into unbounded label cardinality.
Recommended Metrics
Metric
Type
Labels
Purpose
http_requests_total
Counter
method, route, status
Throughput
http_request_duration_seconds
Histogram
route, status
Latency (p50/p95/p99)
http_requests_in_flight
Gauge
route
Saturation
db_query_duration_seconds
Histogram
query_name
Dependency latency
worker_queue_depth
Gauge
queue_name
Backlog
errors_total
Counter
error_type, domain
Error rate
pool_connections_used
Gauge
pool_name
Resource usage
What to Log
Request ID, trace ID, route template, status code, latency bucket.
Key decision points with the inputs that drove the decision.
What Not to Log
Passwords, tokens, cookies, API keys, private keys.
Full payment data, raw PII, auth headers, session contents.
Large payloads that cause cost or privacy problems.
High-cardinality dynamic values as metric labels.
Stack traces for expected/business-logic errors (log at debug level instead).
Structured Fields Convention
// Use stable field names across your codebase
tracing::info!(
user_id = %uid,
tenant_id = %tenant,
order_id = %order,
amount = amount_minor,
currency = %currency,
"order created"
);
Agree on field naming conventions per team. Inconsistent names break queries across services.
Error Instrumentation
// Bad: error lost in a generic log
tracing::warn!("operation failed: {:?}", err);
// Good: capture typed error as a field
tracing::warn!(
error_type = %err.kind(),
error = %err,
"operation failed"
);
When errors cross service boundaries, include a stable error code, not just a message string.
// Bad: blocking the async runtime with synchronous I/O// inside `tracing::instrument` on a hot path.// Good: keep span creation cheap; defer expensive formatting// to subscriber layers (which run on their own thread).
// Bad: logging the same error at multiple levels
tracing::error!("operation failed");
// ... then re-thrown and caught again
tracing::warn!("operation also failed");
// Good: log at the boundary where recovery decision happens.// Inner layers should propagate, not log.
Production Checklist
JSON logs include timestamp, level, target, span context, trace/request ID.
Every external request path has latency, error, and throughput metrics.
Metrics labels are bounded and documented.
Spawned tasks are instrumented with parent/domain context.
Secrets and PII are redacted at source, not only in downstream pipelines.
Dashboards and alerts use symptoms first, internals second.
OTLP exporter has sampling configured for production traffic volume.
Log levels are dynamically changeable without redeploy.
Error rates and latency have alert thresholds with runbooks.
Every public endpoint has at least one RED metric.