dotnetcore / CAP

Distributed transaction solution in micro-service base on eventually consistency, also an eventbus with Outbox pattern
http://cap.dotnetcore.xyz
MIT License
6.61k stars 1.28k forks source link

What is the use of Traceparent in the header? #1570

Closed xiaolipro closed 1 month ago

xiaolipro commented 1 month ago

I want to know what the "tracepoint" in the "Header" is for and when it was set. I looked through the source code and didn't find out when it was assigned a value. 我想知道Header中的tracepoint是用于什么目的,何时赋值的。我查看了源代码,没有发现它被赋值,只找消费者从header中解析的逻辑,他在哪里被赋值呢?我希望伪造一份header以便仍然在使用cap的消费者无缝兼容 image

yang-xiaodong commented 1 month ago

Traceparent is for OpenTelemetry trace contexts, just cap-msg-id and cap-msg-name are required when processing event for external systems.

https://cap.dotnetcore.xyz/user-guide/en/cap/messaging/#heterogeneous-system-integration