# 3rd party requirements breakdown for downstream services

**URL:** <https://discuss.elastic.co/t/3rd-party-requirements-breakdown-for-downstream-services/276455>\
**Category:** APM\
**Tags:** python\
**Created:** [June 20, 2021, 7:55am UTC](https://discuss.elastic.co/t/3rd-party-requirements-breakdown-for-downstream-services/276455 "2021-06-20T07:55:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Koby\_Bass](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/koby_bass/32/90553_2.png) [@Koby\_Bass](https://discuss.elastic.co/u/Koby_Bass)\
**Post date:** [June 20, 2021, 7:55am UTC](https://discuss.elastic.co/t/3rd-party-requirements-breakdown-for-downstream-services/276455/1 "2021-06-20T07:55:45Z")

</div>

We are using APM for distributed tracing of a data processing pipeline.  
Before connecting the pipeline using traceparent, the requirements breakdown in the APM screen was working:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/d/3d90fbe735cfe10a983191b02e581ab0abba1a3b.png)

After distributed tracing was connected, requirements breakdown only works for the most top-level service.  
Is there a way to fix this?

Thanks

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [June 21, 2021, 1:25am UTC](https://discuss.elastic.co/t/3rd-party-requirements-breakdown-for-downstream-services/276455/2 "2021-06-21T01:25:59Z")

</div>

@Koby_Bass which agents (and versions) are you using? What you're describing sounds like it would be caused by the agents not correctly propagating the "tracestate" HTTP header between services.

---

<div class="post-metadata">

**Author:** ![Koby\_Bass](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/koby_bass/32/90553_2.png) [@Koby\_Bass](https://discuss.elastic.co/u/Koby_Bass)\
**Post date:** [June 21, 2021, 11:56am UTC](https://discuss.elastic.co/t/3rd-party-requirements-breakdown-for-downstream-services/276455/3 "2021-06-21T11:56:54Z")

</div>

I'm using the python agent  
Currently I'm propagating the tracestate returned from:  
`elasticapm.get_trace_parent_header()`

And initializing the transaction with trace\_parent

```auto
    transaction = client.begin_transaction(
        transaction_type, trace_parent=parsed_trace_parent
    )

```

The distributed tracing works, but the 3rd party requirements breakdown is broken  
Perhaps there's another way to get the trace\_parent?

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [June 21, 2021, 12:16pm UTC](https://discuss.elastic.co/t/3rd-party-requirements-breakdown-for-downstream-services/276455/4 "2021-06-21T12:16:52Z")

</div>

Just to be clear, there are two different headers that need to be propagated:

- `traceparent`, which is necessary for distributed tracing
- `tracestate`, which is necessary for calculating span metrics (used for the dependencies table)

Are you implementing your own custom propagation? If so, are you propagating both pieces of information? For example see the httplib2 code: [apm-agent-python/httplib2.py at 465fbc23e50d7833331958fa171f933c049e4fce · elastic/apm-agent-python · GitHub](https://github.com/elastic/apm-agent-python/blob/465fbc23e50d7833331958fa171f933c049e4fce/elasticapm/instrumentation/packages/httplib2.py#L112-L118)

If you are propagating them both, or you're relying entirely on built-in instrumentation, then I think I'll need to defer to someone with more expertise on the Python agent.

---

<div class="post-metadata">

**Author:** ![Koby\_Bass](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/koby_bass/32/90553_2.png) [@Koby\_Bass](https://discuss.elastic.co/u/Koby_Bass)\
**Post date:** [June 22, 2021, 9:35am UTC](https://discuss.elastic.co/t/3rd-party-requirements-breakdown-for-downstream-services/276455/5 "2021-06-22T09:35:51Z")

</div>

Thank you Andrew, I was indeed not propagating the tracestate!  
Now it is fixed.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 13, 2021, 5:36am UTC](https://discuss.elastic.co/t/3rd-party-requirements-breakdown-for-downstream-services/276455/6 "2021-07-13T05:36:27Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
