Commit Graph

6 Commits

Author SHA1 Message Date
douxu 4c57c37c26 refactor: sync logger improvements from modelrt to eventrt
- add LokiConfig struct and Loki field to LoggerConfig for dev direct-push
  - replace getEncoder/getLogWriter with mode-aware encoder and getWriteSyncer
    (colored console in dev, JSON in container; stdout instead of stderr)
  - add containerFields() to inject K8s pod/namespace/node as global log fields
  - add loki_syncer.go: async batched push to Loki with 512-entry channel
  - introduce makeLogFieldsSkip/getLoggerCallerInfoSkip for wrapper call-frame support
  - expose ErrorSkip/WarnSkip/InfoSkip facade functions for skip-frame logging
  - add loki.endpoint placeholder to eventrt-configmap.yaml for self-documentation
2026-06-08 13:58:48 +08:00
douxu 2a1929a180 feat: add Kubernetes deployment manifests and hardened Dockerfile
- add multi-stage scratch-based Dockerfile with non-root user and mTLS cert support
  - add K8s Deployment, Service, ConfigMap, and Secret manifests with security hardening
  - bind MONGODB_PASSWORD and SERVICE_SECRET_KEY from environment variables via viper
  - restructure deploy/ directory and remove unused modelrt.cnf
  - bump Go version to 1.26.3 and add event-flow-analysis doc
2026-05-29 11:09:03 +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 722e8a9c0f optimize code of rabbitmq connection 2026-02-06 17:55:30 +08:00
douxu 5653fb0719 optimze of rabbitmq and mongodb code 2026-01-30 17:43:16 +08:00
douxu 9380717b75 add code of db or mq init 2026-01-29 16:54:00 +08:00