# Control Sample Rate or \`recorded\` Flag Per Request

**URL:** <https://discuss.elastic.co/t/control-sample-rate-or-recorded-flag-per-request/177145>\
**Category:** APM\
**Created:** [April 16, 2019, 7:36pm UTC](https://discuss.elastic.co/t/control-sample-rate-or-recorded-flag-per-request/177145 "2019-04-16T19:36:40Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![dvisz-inf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dvisz-inf/32/42617_2.png) [@dvisz-inf](https://discuss.elastic.co/u/dvisz-inf)\
**Post date:** [April 23, 2019, 12:13am UTC](https://discuss.elastic.co/t/control-sample-rate-or-recorded-flag-per-request/177145/7 "2019-04-23T00:13:24Z")

</div>

> [@Eyal\_Koren](#):
>
> Since you are not using the RUM agent, there is no parent span in your case.

Will APM Server discard any transactions or spans which belong to a distributed trace for which the initial transaction/span has not been received by APM? I had kind of hoped that I could just create a valid `traceparent` value and send it with my initial request, and that would be all that was needed.

> [@Eyal\_Koren](#):
>
> Ideally, how would you expect this feature to look like?

I'd like it to be easier to decide myself when or how often I will record a distributed trace.

The simplest solution I think would be if APM Server did not discard a transaction or span which references a parent that doesn't exist. Perhaps that would lead to complications that I don't see, though!

I think another similar issue that I have is that the current W3 draft has no bits reserved for tuning the level of the trace. See here:

> [@Trace Level and Reserved Traceparent Flags](https://discuss.elastic.co/t/trace-level-and-reserved-traceparent-flags/176506):
>
> The W3 draft says The behavior of other flags, such as ( 00000100 ) is not defined and reserved for future use. Implementation MUST set those to zero. [https://www.w3.org/TR/trace-context/#other-flags](https://www.w3.org/TR/trace-context/#other-flags) I'm pretty sad about this. I have other trace flags that I'd like to have available to me, like controlling the level of trace detail, or the recording other diagnostic information. Does anyone else feel like this is a missed opportunity? What are the chances that some of those bits could be …

It has been suggested to use a `tracestate` header to transmit this information, and if Elastic APM agents propagate this header to all participants in a distributed trace, then it seems that that will problem will be solved.

---

_[View the full topic](https://discuss.elastic.co/t/control-sample-rate-or-recorded-flag-per-request/177145)._
