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 73bcaf8 commit 401a537
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ redirects:

## Syntax

```
```py
newrelic.agent.set_background_task(flag=True)
```

Expand Down Expand Up @@ -74,16 +74,16 @@ None.

An example of setting a web transaction to a non-web background task:

```
```py
def wsgi_app(environ, start_response):
newrelic.agent.set_background_task()
newrelic.agent.set_background_task()
```

### Reclassifying a background task as a web transaction [#bg-task-example-2]

Sometimes, you may want to instead classify a background task as a web transaction, so you can see it with your other application web transactions. To do that, add this call where a monitored background task executes:

```
```py
import newrelic.agent
newrelic.agent.set_background_task(False)
```

0 comments on commit 401a537

Please sign in to comment.