Commit Graph

6 Commits

Author SHA1 Message Date
douxu 715183994c fix: remove status mutation side effect in PublishEventToUI
- stop overwriting record.Status inside the publish function
  - status should be managed by the caller, not the publisher
2026-05-11 17:35:43 +08:00
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 e0863eb04a add code of rabbitmq message ack action 2026-03-03 17:09:31 +08:00
douxu 609511c7cd optimize code of receipt event 2026-03-02 17:00:56 +08:00
douxu d239f9bd85 add code of receipt event and store into mongodb 2026-02-27 16:36:40 +08:00