Microservices¶
Target Architecture — Final-State Design
This page describes the final-state microservice topology of the Observability & Feedback Platform. All services follow the ConnectSoft.Factory.Observability.{Service} naming convention and the Clean Architecture layering of the ConnectSoft microservice template.
The platform comprises eleven microservices, each owning one or more aggregate roots within a single bounded context. Services communicate through the canonical event envelope on Azure Service Bus (via MassTransit) and expose synchronous APIs only where a request/response contract is required. High-volume ingestion services (TraceService, MetricAggregationService) scale independently of the transactional services (IncidentService, FeedbackService).
Service Catalog¶
| Microservice | Responsibility | APIs | Events | Aggregate Roots | Store |
|---|---|---|---|---|---|
ConnectSoft.Factory.Observability.TraceService |
Ingest and serve correlated distributed traces by traceId. |
GET /traces/{traceId} |
publishes TraceRecorded |
TraceRecord |
Application Insights |
ConnectSoft.Factory.Observability.LogQueryService |
Govern tenant-scoped search over structured Serilog logs. | POST /logs/search |
— | LogRecordReference |
Log Analytics |
ConnectSoft.Factory.Observability.MetricAggregationService |
Roll raw counters/histograms into queryable metric series. | POST /metrics/query |
publishes MetricAggregated |
MetricSeries |
Application Insights |
ConnectSoft.Factory.Observability.DashboardService |
Define and serve reusable multi-tenant dashboards. | POST /dashboards |
— | DashboardDefinition |
Azure SQL / PostgreSQL |
ConnectSoft.Factory.Observability.AlertRuleService |
Manage alert rules and raise triggers. | POST /alerts/rules |
publishes AlertTriggered |
AlertRule |
Azure SQL / PostgreSQL |
ConnectSoft.Factory.Observability.IncidentService |
Manage the incident lifecycle with trace lineage. | POST /incidents |
publishes IncidentOpened, IncidentResolved |
Incident |
Azure SQL / PostgreSQL |
ConnectSoft.Factory.Observability.FeedbackService |
Capture durable feedback items from signals, humans, agents. | POST /feedback-items |
publishes FeedbackItemCreated |
FeedbackItem |
Azure SQL / PostgreSQL + Blob |
ConnectSoft.Factory.Observability.QualityScoreService |
Compute per-project / per-artifact quality scores. | GET /quality/projects/{projectId} |
publishes QualityScoreComputed |
QualityScore |
Azure SQL / PostgreSQL |
ConnectSoft.Factory.Observability.CostTelemetryService |
Attribute cost per tenant/project; detect anomalies. | GET /cost/projects/{projectId} |
publishes CostAnomalyDetected |
CostSignal |
Azure SQL / PostgreSQL + Blob |
ConnectSoft.Factory.Observability.SloService |
Define SLOs, track error budgets, detect breaches. | — (internal) | publishes SloBreached |
SloDefinition |
Azure SQL / PostgreSQL |
ConnectSoft.Factory.Observability.TelemetryCorrelationService |
Stitch traces, logs, metrics, feedback into one view by traceId. |
— (internal) | consumes all; emits correlation snapshots | TelemetryCorrelation |
Application Insights + Azure SQL |
Service Interaction Diagram¶
flowchart TB
subgraph Ingest["Ingestion"]
Trace["TraceService"]
LogQ["LogQueryService"]
MetricAgg["MetricAggregationService"]
end
subgraph Detect["Detection"]
Slo["SloService"]
AlertRule["AlertRuleService"]
Dashboard["DashboardService"]
end
subgraph React["Reaction & Learning"]
Incident["IncidentService"]
Feedback["FeedbackService"]
Quality["QualityScoreService"]
Cost["CostTelemetryService"]
end
Correlation["TelemetryCorrelationService"]
Trace -->|"TraceRecorded"| Correlation
LogQ -->|"log refs"| Correlation
MetricAgg -->|"MetricAggregated"| Correlation
MetricAgg -->|"series"| Slo
MetricAgg -->|"series"| AlertRule
MetricAgg -->|"series"| Dashboard
Slo -->|"SloBreached"| Incident
AlertRule -->|"AlertTriggered"| Incident
Incident -->|"IncidentResolved"| Feedback
Trace -->|"runtime signals"| Feedback
MetricAgg -->|"usage"| Cost
Cost -->|"CostAnomalyDetected"| Feedback
Feedback -->|"FeedbackItemCreated"| KP["Knowledge Platform"]
Quality -->|"QualityScoreComputed"| KP
Correlation -->|"correlated views"| Incident
Correlation -->|"correlated views"| Quality
Service Notes¶
- TraceService is read-optimised over Application Insights. It does not store trace bodies in its own database; it queries App Insights and projects a correlated
TraceRecordview keyed bytraceId, enriched with the required telemetry dimensions. - LogQueryService is a governed query facade over Log Analytics. It enforces
tenantIdscoping and translates factory-domain filters (project, module, agent) into KQL. - MetricAggregationService runs both an API (ad-hoc queries) and is driven by the MetricAggregationWorker for scheduled rollups.
- TelemetryCorrelationService and SloService have no public API surface; they are internal services driven by events and workers, exposed only through dashboards and the correlation views consumed by
IncidentServiceandQualityScoreService. - FeedbackService and QualityScoreService are the learning services — their events are the platform's primary contribution to the Knowledge Platform improvement loop.
All services emit their own telemetry into the same OTEL/Serilog pipeline (see Observability) — the platform observes itself with the same tooling it provides to the factory.