Commit Graph

3 Commits

Author SHA1 Message Date
douxu 34b9a569ae feat(data-object)!: enhance measurement mode update workflow
- support numeric manual and automatic measurement modes
- allow omitted fields and optional manual data values
- start or stop dataRT writes when switching measurement modes
- atomically replace manual measurement values in Redis
- record bounded operations with Unix millisecond timestamps
- propagate client tokens through request contexts
- return errors instead of panicking when Redis initialization fails
- optimize measurement queries and add regression tests
2026-07-21 16:13:23 +08:00
douxu 03bd058558 feat: implement end-to-end distributed tracing for HTTP and async tasks
- introduce typed traceCtxKey to prevent context key collisions (staticcheck fix)
  - inject B3 trace values into c.Request.Context() in StartTrace middleware
    so handlers using c.Request.Context() carry trace info
  - create startup trace context in main.go, replacing context.TODO()
  - propagate HTTP traceID/spanID through TaskQueueMessage into RabbitMQ
    worker, linking HTTP request → publish → execution on the same traceID
  - fix GORM logger null traceID by binding ctx to AutoMigrate and queries
    via db.WithContext(ctx)
  - thread ctx through handler factory to fix null traceID in startup logs
  - replace per-request RabbitMQ producer with channel-based
    PushTaskToRabbitMQ goroutine; restrict Swagger to non-production
2026-04-23 16:48:32 +08:00
douxu 0c09e7bd25 add func of generate service token 2025-09-12 17:12:02 +08:00