forked from mtusi2026/mtusi2026lab6
Prepare verified laboratory 6 implementation and evidence
This commit is contained in:
@@ -0,0 +1,363 @@
|
||||
{
|
||||
"source": "backend/internal/adapter/telemetry",
|
||||
"validation": "Frozen SDK95 source unchanged; real native OpenObserve1.1.2/Collector0.163.2 all3 ingestion, native queries/correlation/persistence/outage verified; Grafana rendering and firing/resolved pending",
|
||||
"sdk": {
|
||||
"traceMetric": "1.47.0",
|
||||
"logExporter": "0.23.0",
|
||||
"endpoint": "OTEL_EXPORTER_OTLP_ENDPOINT",
|
||||
"paths": [
|
||||
"/v1/traces",
|
||||
"/v1/metrics",
|
||||
"/v1/logs"
|
||||
],
|
||||
"protocol": "HTTP/protobuf"
|
||||
},
|
||||
"resources": {
|
||||
"service.name": [
|
||||
"messenger-api",
|
||||
"messenger-worker"
|
||||
],
|
||||
"service.version": "lab6-v1",
|
||||
"service.instance.id": "random UUID per process",
|
||||
"deployment.environment.name": "lab"
|
||||
},
|
||||
"trace": {
|
||||
"propagator": "W3C traceparent/tracestate",
|
||||
"spans": [
|
||||
"METHOD route-template",
|
||||
"attachment.publish",
|
||||
"attachment.process",
|
||||
"postgres.query",
|
||||
"s3.put",
|
||||
"s3.get",
|
||||
"s3.stat",
|
||||
"postgres.acquire"
|
||||
],
|
||||
"requestAttributes": [
|
||||
"method",
|
||||
"route",
|
||||
"status_class"
|
||||
],
|
||||
"excluded": [
|
||||
"SQL statement/arguments",
|
||||
"object keys",
|
||||
"username",
|
||||
"password",
|
||||
"Authorization",
|
||||
"token",
|
||||
"DSN",
|
||||
"file payload"
|
||||
]
|
||||
},
|
||||
"logs": {
|
||||
"bodyAndEventName": [
|
||||
"http.request",
|
||||
"worker.delivery",
|
||||
"worker.job",
|
||||
"telemetry.database_observer"
|
||||
],
|
||||
"attributes": [
|
||||
"event",
|
||||
"outcome",
|
||||
"request_id (HTTP only, response-generated UUID)"
|
||||
],
|
||||
"correlation": [
|
||||
"trace_id",
|
||||
"span_id"
|
||||
],
|
||||
"httpOutcomes": [
|
||||
"2xx",
|
||||
"3xx",
|
||||
"4xx",
|
||||
"5xx"
|
||||
],
|
||||
"deliveryOutcomes": [
|
||||
"processed",
|
||||
"dependency_error"
|
||||
],
|
||||
"jobOutcomes": [
|
||||
"ready",
|
||||
"retry",
|
||||
"failed",
|
||||
"stale"
|
||||
]
|
||||
},
|
||||
"metrics": [
|
||||
{
|
||||
"name": "http_requests",
|
||||
"kind": "counter",
|
||||
"attributes": [
|
||||
"method",
|
||||
"route",
|
||||
"status_class"
|
||||
],
|
||||
"healthExcluded": true
|
||||
},
|
||||
{
|
||||
"name": "http_duration",
|
||||
"kind": "histogram",
|
||||
"unit": "s",
|
||||
"attributes": [
|
||||
"method",
|
||||
"route",
|
||||
"status_class"
|
||||
],
|
||||
"buckets": [
|
||||
0.005,
|
||||
0.01,
|
||||
0.025,
|
||||
0.05,
|
||||
0.1,
|
||||
0.25,
|
||||
0.5,
|
||||
1,
|
||||
2,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "jobs_processed",
|
||||
"kind": "counter",
|
||||
"attributes": [
|
||||
"job_type",
|
||||
"outcome"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "job_duration",
|
||||
"kind": "histogram",
|
||||
"unit": "s",
|
||||
"attributes": [
|
||||
"job_type",
|
||||
"outcome"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "time_to_ready",
|
||||
"kind": "histogram",
|
||||
"unit": "s",
|
||||
"attributes": [
|
||||
"job_type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "queue_depth",
|
||||
"kind": "gauge",
|
||||
"attributes": [
|
||||
"queue"
|
||||
],
|
||||
"queue": "attachment-jobs",
|
||||
"source": "logical current-version attachment_jobs backlog, including durable unpublished intents"
|
||||
},
|
||||
{
|
||||
"name": "queue_oldest_age_seconds",
|
||||
"kind": "gauge",
|
||||
"attributes": [
|
||||
"queue"
|
||||
],
|
||||
"queue": "attachment-jobs",
|
||||
"source": "logical current-version attachment_jobs backlog, including durable unpublished intents"
|
||||
},
|
||||
{
|
||||
"name": "db_pool_used",
|
||||
"kind": "gauge"
|
||||
},
|
||||
{
|
||||
"name": "db_pool_capacity",
|
||||
"kind": "gauge"
|
||||
},
|
||||
{
|
||||
"name": "worker_busy",
|
||||
"kind": "gauge",
|
||||
"scope": "worker"
|
||||
},
|
||||
{
|
||||
"name": "worker_capacity",
|
||||
"kind": "gauge",
|
||||
"scope": "worker"
|
||||
},
|
||||
{
|
||||
"name": "process_resident_memory_bytes",
|
||||
"kind": "gauge"
|
||||
},
|
||||
{
|
||||
"name": "go_heap_bytes",
|
||||
"kind": "gauge"
|
||||
},
|
||||
{
|
||||
"name": "process_cpu",
|
||||
"kind": "counter",
|
||||
"unit": "s"
|
||||
},
|
||||
{
|
||||
"name": "db_pool_pending_acquires",
|
||||
"kind": "gauge",
|
||||
"source": "native pgxpool AcquireTracer start/end; includes waiting and connection construction"
|
||||
},
|
||||
{
|
||||
"name": "db_pool_acquire_duration",
|
||||
"kind": "histogram",
|
||||
"unit": "s",
|
||||
"attributes": [
|
||||
"outcome"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "database_observer_up",
|
||||
"kind": "gauge",
|
||||
"semantics": "0 means DB-derived gauges unavailable; independent HTTP/process telemetry continues"
|
||||
},
|
||||
{
|
||||
"name": "database_observer_failures",
|
||||
"kind": "counter"
|
||||
},
|
||||
{
|
||||
"name": "ready_slo_matured_10s",
|
||||
"kind": "gauge",
|
||||
"semantics": "immutable initial accepted_at/first_ready_at; cohorts age at least10s"
|
||||
},
|
||||
{
|
||||
"name": "ready_slo_timely_10s",
|
||||
"kind": "gauge",
|
||||
"semantics": "immutable initial accepted_at/first_ready_at; cohorts age at least10s"
|
||||
},
|
||||
{
|
||||
"name": "ready_slo_matured_30s",
|
||||
"kind": "gauge",
|
||||
"semantics": "immutable initial accepted_at/first_ready_at; cohorts age at least10s"
|
||||
},
|
||||
{
|
||||
"name": "ready_slo_timely_30s",
|
||||
"kind": "gauge",
|
||||
"semantics": "immutable initial accepted_at/first_ready_at; cohorts age at least10s"
|
||||
},
|
||||
{
|
||||
"name": "ready_slo_matured_300s",
|
||||
"kind": "gauge",
|
||||
"semantics": "immutable initial accepted_at/first_ready_at; cohorts age at least10s"
|
||||
},
|
||||
{
|
||||
"name": "ready_slo_timely_300s",
|
||||
"kind": "gauge",
|
||||
"semantics": "immutable initial accepted_at/first_ready_at; cohorts age at least10s"
|
||||
}
|
||||
],
|
||||
"bounds": {
|
||||
"traceQueue": 128,
|
||||
"traceBatch": 32,
|
||||
"logQueue": 128,
|
||||
"logBatch": 32,
|
||||
"exportTimeoutSeconds": 1,
|
||||
"sdkRetry": false,
|
||||
"metricIntervalSeconds": 2,
|
||||
"gaugeReadTimeoutMilliseconds": 500,
|
||||
"defaultSamplingRatio": 1,
|
||||
"httpDrainDefaultSeconds": 3,
|
||||
"httpDrainMaximumSeconds": 4,
|
||||
"note": "Lab7 retains its separately reviewed8/9s drain with15s supervisor; ForceClose shared on expiry",
|
||||
"collectorQueueBytesPerSignal": 8388608,
|
||||
"collectorRetryMaximumElapsedSeconds": 5,
|
||||
"collectorMemoryLimiterMiB": 128,
|
||||
"collectorContainerMiB": 256
|
||||
},
|
||||
"prometheusExpected": "Native OpenObserve names verified: no messenger namespace, no automatic total/seconds suffix; see OPENOBSERVE-CONTRACT.json and evidence/openobserve/schema-discovery.json",
|
||||
"slo": {
|
||||
"acceptedAt": "first QueueAttachment within durable handoff transaction, distinct from upload start",
|
||||
"firstReadyAt": "first successful CompleteAttachment, COALESCE preserved through replay/advance",
|
||||
"windowsSeconds": [
|
||||
10,
|
||||
30,
|
||||
300
|
||||
],
|
||||
"maturationSeconds": 10,
|
||||
"unknownLegacyRows": "excluded; no invented acceptance history",
|
||||
"nativeResourceJoin": [
|
||||
"service_name",
|
||||
"service_instance_id"
|
||||
],
|
||||
"gaugeFreshnessSeconds": 10
|
||||
},
|
||||
"storageNative": {
|
||||
"contract": "OPENOBSERVE-CONTRACT.json",
|
||||
"logs": {
|
||||
"stream": "messenger",
|
||||
"timestamp": "_timestamp",
|
||||
"body": "body",
|
||||
"event": "event",
|
||||
"requestId": "request_id",
|
||||
"traceId": "trace_id",
|
||||
"spanId": "span_id",
|
||||
"service": "service_name",
|
||||
"severity": "severity",
|
||||
"outcome": "outcome"
|
||||
},
|
||||
"traces": {
|
||||
"stream": "messenger",
|
||||
"traceId": "trace_id",
|
||||
"spanId": "span_id",
|
||||
"parentSpanId": "reference_parent_span_id",
|
||||
"parentTraceId": "reference_parent_trace_id",
|
||||
"operation": "operation_name",
|
||||
"service": "service_name",
|
||||
"status": "span_status",
|
||||
"start": "start_time",
|
||||
"end": "end_time",
|
||||
"duration": "duration",
|
||||
"timestamp": "_timestamp",
|
||||
"units": {
|
||||
"start_time": "nanoseconds",
|
||||
"end_time": "nanoseconds",
|
||||
"duration": "microseconds",
|
||||
"_timestamp": "microseconds"
|
||||
}
|
||||
},
|
||||
"metrics": {
|
||||
"nativePrometheusEndpoint": "/api/default/prometheus",
|
||||
"counterNames": [
|
||||
"http_requests",
|
||||
"jobs_processed",
|
||||
"database_observer_failures",
|
||||
"process_cpu"
|
||||
],
|
||||
"histogramBases": [
|
||||
"http_duration",
|
||||
"job_duration",
|
||||
"time_to_ready",
|
||||
"db_pool_acquire_duration"
|
||||
],
|
||||
"histogramSuffixes": [
|
||||
"_bucket",
|
||||
"_count",
|
||||
"_sum",
|
||||
"_min",
|
||||
"_max"
|
||||
],
|
||||
"gauges": [
|
||||
"queue_depth",
|
||||
"queue_oldest_age_seconds",
|
||||
"db_pool_used",
|
||||
"db_pool_capacity",
|
||||
"db_pool_pending_acquires",
|
||||
"worker_busy",
|
||||
"worker_capacity",
|
||||
"go_heap_bytes",
|
||||
"process_resident_memory_bytes",
|
||||
"database_observer_up",
|
||||
"ready_slo_matured_10s",
|
||||
"ready_slo_matured_30s",
|
||||
"ready_slo_matured_300s",
|
||||
"ready_slo_timely_10s",
|
||||
"ready_slo_timely_30s",
|
||||
"ready_slo_timely_300s"
|
||||
],
|
||||
"resourceLabels": [
|
||||
"service_name",
|
||||
"service_instance_id",
|
||||
"service_version",
|
||||
"deployment_environment_name"
|
||||
],
|
||||
"noLegacyExporterNamespace": true,
|
||||
"noAutomaticTotalCounterSuffix": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user