SkyAPM / cpp2sky

Distributed tracing and monitor SDK in CPP for Apache SkyWalking APM
https://skywalking.apache.org
Apache License 2.0
57 stars 18 forks source link

add sample flag support to the tracing context #97

Closed wbpcode closed 2 years ago

wbpcode commented 2 years ago

Signed-off-by: wbpcode wbphub@live.com

To close #93.

wu-sheng commented 2 years ago

Have you considered creating another IgnoredTracingContext to make the cost less? Like Java did? https://github.com/apache/skywalking-java/blob/main/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/IgnoredTracerContext.java

One tip, the sample flag in the header is not used for upstream, as SkyWalking backend is analyzing topology and metrics according to these traces, we prefer once the header is provided, we continue the trace.

wbpcode commented 2 years ago

It seems that I misunderstood the sampling policy of skywalking. So I will close the PR for now.