Commit Graph

3 Commits

Author SHA1 Message Date
douxu 2f7cd5a8fc feat: add event lifecycle API and UI fanout publishing - extract event status, MQ exchange/queue, and DB name constants to constants/event.go - add bson tags and IsPersisted flag to EventRecord for proper MongoDB serialization
- publish persisted alarm events to UI consumers via RabbitMQ fanout exchange                                                 - add GET /events/:event_uuid handler to query a single event from MongoDB
  - add PATCH confirm/close handlers with atomic FindOneAndUpdate status transitions                                            - register /events routes in main.go
2026-05-08 15:43:54 +08:00
douxu 44ded93411 feat: add OpenTelemetry distributed tracing to eventRT - add OtelConfig to EventRTConfig and configs/config.yaml - add middleware/trace.go with InitTracerProvider (W3C TraceContext) and StartTrace gin middleware
- migrate logger to read traceID/spanID from OTel span context instead of ctx string keys
  - extract upstream W3C trace context from AMQP headers in processAlarmEventMessage to chain spans across modelRT→eventRT
  - add per-message span in processAlarmEventMessage for end-to-end trace visibility
2026-05-07 16:32:53 +08:00
douxu 9380717b75 add code of db or mq init 2026-01-29 16:54:00 +08:00