Skip to content

Commit

Permalink
chore: add language identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
brnhensley committed May 29, 2023
1 parent 6f6d4ce commit ece36c6
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ redirects:

## Syntax

```
```py
newrelic.agent.insert_distributed_trace_headers(list_of_headers)
```

Expand Down Expand Up @@ -57,7 +57,7 @@ This call is used to implement distributed tracing. It inserts headers into a li
</td>

<td>
Required. A list of headers. This list will be mutated by the call (headers will be inserted into the list in the form of (header_name, header_value)).
Required. A list of headers. This list will be mutated by the call (headers will be inserted into the list in the form of `(header_name, header_value)`).
</td>
</tr>
</tbody>
Expand All @@ -77,11 +77,10 @@ Returns `None`. The input list will be updated by a call to this function.

An example of using `insert_distributed_trace_headers` in creating an [external trace](/docs/agents/python-agent/python-agent-api/external-trace) from within single a background task:

```
```py
@newrelic.agent.background_task()
def main(url):
with newrelic.agent.ExternalTrace('my_external_library',
url, method='GET'):
with newrelic.agent.ExternalTrace('my_external_library', url, method='GET'):
# Generate the payload in the context of the ExternalTrace
# span that sends it
headers = []
Expand All @@ -95,7 +94,7 @@ def main(url):

An example of using `insert_distributed_trace_headers` in creating an [external trace](/docs/agents/python-agent/python-agent-api/external-trace):

```
```py
def _bind_url(url, *args, **kwargs):
# _bind_url is called with the args and kwargs sent to the `get`
# method below
Expand Down

0 comments on commit ece36c6

Please sign in to comment.