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
809e1cd87d
Refactor: extract task constants to dedicated constants package
...
- Add constants/task.go with centralized task-related constants
- Task priority levels (default, high, low)
- Task queue configuration (exchange, queue, routing key)
- Task message settings (max priority, TTL)
- Task retry settings (max retries, delays)
- Test task settings (sleep duration, max limit)
- Update task-related files to use constants from constants package:
- handler/async_task_create_handler.go
- task/queue_message.go
- task/queue_producer.go
- task/retry_manager.go
- task/test_task.go
- task/types.go (add TypeTest)
- task/worker.go
2026-04-22 17:20:26 +08:00
douxu
898beaeec4
optimize struct of rabbitmq event
2026-03-02 17:00:09 +08:00
douxu
4b52e5f3c6
optimize code of event record and push rabbitmq func
2026-02-28 17:38:33 +08:00
douxu
6c9da6fcd4
init event struct with option mode
2026-02-24 17:08:48 +08:00
douxu
56b9999d6b
add constants varibale of power system events
2026-02-12 17:09:08 +08:00
douxu
3374eec047
optimize code of redis init
2026-01-28 16:49:12 +08:00
douxu
617d21500e
optimize code of redis connenct func and real time data calculate
2026-01-27 17:41:17 +08:00
douxu
1a1727adab
optimize reponse code and business code of measurement sub api
2026-01-26 16:29:50 +08:00
douxu
ba5e5b3d1c
optimzie code of constants package
2026-01-16 17:08:28 +08:00
douxu
d3b1f0afbe
add code of send all target removed system signal in real time data pull api and fix bug of component attribute query api
2026-01-14 17:32:01 +08:00
douxu
d1495b7ab8
optimize code of component attribute update api
2026-01-09 17:26:45 +08:00
douxu
42751c1020
optimize the logic for loading the cache of measurement nodes for traversing components
2025-12-25 17:17:20 +08:00
douxu
51f65500f3
add func of init component measurement recommend
2025-12-24 16:55:55 +08:00
douxu
7ea38615b4
unified caching system collection key names
2025-12-24 09:34:03 +08:00
douxu
6e16a9a39a
fix bug of measurement recommend injection func
2025-12-24 09:06:42 +08:00
douxu
c16680d4c2
fix bug of t4-t7 model combine prefix string func
2025-12-22 10:45:47 +08:00
douxu
0add3cf6db
feat:implement search support for abbreviated token ranges (e.g., token4-token7)
2025-12-15 16:49:38 +08:00
douxu
c92cee9575
optimzie logic of real time data pull api
2025-12-12 17:22:20 +08:00
douxu
befb4e8971
fix bug of server deploy
2025-12-11 16:42:25 +08:00
douxu
f48807e5e5
optimize measurement link api
2025-12-08 17:01:24 +08:00
douxu
3f70be0d1c
fix bug of new version of measurement recommend api
2025-12-06 18:32:00 +08:00
douxu
46e72ce588
optimize redis test data lua shell
2025-12-04 17:26:35 +08:00
douxu
8a4116879b
add real time data measurement target update func
2025-12-02 17:26:15 +08:00
douxu
fca6905d74
optimize real time data pulling and subscription api
2025-11-27 16:59:03 +08:00
douxu
6f3134b5e9
optimize struct of real time data subscription api and fix bug of real time data pull api
2025-11-26 17:49:24 +08:00
douxu
9593c77c18
optimize real time data analyze of continuousComputation func
2025-11-17 16:39:26 +08:00
douxu
8cbbfbd695
implement real time data computing api
2025-11-14 16:34:34 +08:00
douxu
984ee3003d
optimize variable naming and api swagger comment
2025-11-13 11:48:26 +08:00
douxu
041d7e5788
optimize variable naming and optimize real time data computing api
2025-11-12 17:34:18 +08:00
douxu
8d6efe8bb1
optimize real time data pull api
2025-11-10 17:32:18 +08:00
douxu
8090751914
optimize update monitor config func of real time data query api
2025-11-06 17:22:14 +08:00
douxu
b75358e676
optimize first create monitor config func of real time data query api
2025-11-05 18:20:54 +08:00
douxu
594dc68ab1
create api of real time data monitor
2025-11-03 17:35:03 +08:00
douxu
62e897190d
optimize code of measurement recommend and logger output
2025-10-15 17:08:32 +08:00
douxu
5f5eb22b39
optimize code of redis search query
2025-09-25 16:39:45 +08:00
douxu
4ee836c70f
add redis search code of query model object
2025-09-24 16:43:11 +08:00
douxu
51e8a677ca
optimize real time data model
2025-09-18 16:53:25 +08:00
douxu
a9532debe9
add client token of redis operation
2025-09-16 15:50:22 +08:00
douxu
727b9a98ec
add CL3611 and power104 proto code
2025-09-02 16:38:03 +08:00
douxu
3aab2c8a37
add telemetry machine code
2025-09-01 16:15:30 +08:00
douxu
3e833909d1
feat(token-parse): 1. add func of parse token 2.add func of query grid、zone、station、component 3.modify package of constant
...
http://server.baseware.net:9000/project/datart/task/22
2025-08-05 15:20:07 +08:00