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 74f9529 commit 7cb7416
Showing 1 changed file with 8 additions and 8 deletions.
Expand Up @@ -13,7 +13,7 @@ redirects:

## Syntax

```
```py
newrelic.agent.asgi_application(application=None, name=None, group=None, framework=None)
```

Expand All @@ -34,7 +34,7 @@ For an explanation of the reasons to use the decorator versus the wrappers, see

### Decorator parameters

```
```py
newrelic.agent.asgi_application(application=None, name=None, group=None, framework=None)
```

Expand All @@ -58,7 +58,7 @@ The `asgi_application` decorator uses these parameters:
<td>
`application`

_string, application object_
_string_, or _application object_
</td>

<td>
Expand Down Expand Up @@ -108,7 +108,7 @@ The `asgi_application` decorator uses these parameters:

### Wrapper parameters

```
```py
newrelic.agent.ASGIApplicationWrapper(wrapped, application=None, name=None, group=None, framework=None)
```

Expand Down Expand Up @@ -144,7 +144,7 @@ This takes all of the [parameters](#decorator-parameters) required by `asgi_appl

### Path-based wrapper parameters [#path-based-parameters]

```
```py
newrelic.agent.wrap_asgi_application(module, object_path, application=None, name=None, group=None, framework=None)
```

Expand Down Expand Up @@ -196,7 +196,7 @@ In addition to the [parameters](#decorator-parameters) required by `asgi_applica

An example of the decorator being called without the optional `application` parameter:

```
```py
@newrelic.agent.asgi_application()
async def application(scope, receive, send):
await send(
Expand All @@ -218,7 +218,7 @@ async def application(scope, receive, send):

An example of using the `ASGIApplicationWrapper`, which may be necessary if the `asgi_application` decorator doesn't work:

```
```py
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
from django.core.asgi import get_asgi_application
Expand All @@ -231,7 +231,7 @@ application = newrelic.agent.ASGIApplicationWrapper(application)

An example of using the path-based wrapper:

```
```py
import newrelic.agent
newrelic.agent.initialize('newrelic.ini')

Expand Down

0 comments on commit 7cb7416

Please sign in to comment.