sofastack / sofa-tracer

SOFATracer is a component for the distributed system call trace. And through a unified traceId logging the logs of various network calls in the invoking link. These logs can be used for quick discovery of faults, service governance, etc.
Apache License 2.0
1.11k stars 375 forks source link

traceId 支持自定义 #235

Open taotao365s opened 5 years ago

taotao365s commented 5 years ago

Your question

目前tracerId很不直观,尤其是把进程PID放在末尾,误认为tracerId没有变化

建议:

describe your question clearly

Your scenes

describe your use scenes (why need this feature)

Your advice

describe the advice or solution you'd like

Environment

glmapper commented 5 years ago

Are there any specific suggestions? Of course, if the rules for generating tracerId can be customized, it is best. You can provide a PR to support custom generation rules.

rayzeng commented 5 years ago

要做全流程traceid,会有从客户端生产的场景,希望有支持自定义设置的能力

yinay commented 4 years ago

Another scenario, how to support upstream Application TraceId, which is generated by SkyWalking.

glmapper commented 3 years ago

要做全流程traceid,会有从客户端生产的场景,希望有支持自定义设置的能力

如果你的应用和你的下游应用使用的产生 tracerId 的生成策略是不一致的,那么就可能会导致我们整个链路错乱。提供扩展生成 tracerId 是个非常简单的事情,但是由此带来的一些链路正确性和安全性问题就没有办法得以保障。

chenmudu commented 3 years ago

所以这个issue讨论的结果,是否需要做 traceId 默认生成规则的修改(traceId变化更加明显)以及是否去支持用户自定义traceId? @glmapper

khotyn commented 3 years ago

如果提供自定义的 traceId,关键还是要看自定义的 traceId 能否保证全局的唯一性。

chenmudu commented 3 years ago

如果提供自定义的 traceId,关键还是要看自定义的 traceId 能否保证全局的唯一性。

😀 个人认为, 也许可以开放给用户,由用户自行去保证唯一性。

taotao365s commented 3 years ago

如果提供自定义的 traceId,关键还是要看自定义的 traceId 能否保证全局的唯一性。

😀 个人认为, 也许可以开放给用户,由用户自行去保证唯一性。