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 ece36c6 commit 3cecfa3
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ redirects:

## Syntax

```
```py
newrelic.agent.message_trace(library, operation, destination_type, destination_name, params={})
```

Expand Down Expand Up @@ -46,7 +46,7 @@ For an explanation of the uses of these different call formats, see [Different c

### Parameters for message_trace [#main-parameters]

```
```py
newrelic.agent.message_trace(library, operation, destination_type, destination_name, params={})
```

Expand Down Expand Up @@ -130,15 +130,15 @@ The `message_trace` decorator uses these parameters:

### Parameters for MessageTrace [#context-mgr-parameters]

```
```py
newrelic.agent.MessageTrace(library, operation, destination_type, destination_name, params={})
```

The `MessageTrace` context manager takes all of the [parameters](#main-parameters) taken by `message_trace`.

### Parameters for MessageTraceWrapper [#wrapper-parameters]

```
```py
newrelic.agent.MessageTraceWrapper(wrapped, library, operation, destination_type, destination_name, params={})
```

Expand Down Expand Up @@ -174,7 +174,7 @@ The `MessageTraceWrapper` takes all of the same parameters as the [decorator](#m

### Parameters for wrap_message_trace [#path-based-parameters]

```
```py
newrelic.agent.wrap_message_trace(module, object_path, library, operation, destination_type, destination_name, params={})
```

Expand Down Expand Up @@ -230,15 +230,15 @@ The `wrap_message_trace` takes all of the parameters that the [decorator](#main-

An example of using `message_trace`:

```
```py
@message_trace('library', 'Consume', 'Exchange', 'x')
def foo():
pass
```

An example of using `message_trace` decorator with a native coroutine:

```
```py
@message_trace('library', 'Consume', 'Exchange', 'x')
async def foo():
pass
Expand All @@ -248,7 +248,7 @@ async def foo():

An example of using the `MessageTrace` context manager:

```
```py
def basic_get(queue, no_ack=False):
with MessageTrace('library', 'Consume', 'Exchange', 'x'):
pass
Expand All @@ -258,7 +258,7 @@ def basic_get(queue, no_ack=False):

An example of using the `MessageTraceWrapper`:

```
```py
wrapped_basic_get = newrelic.agent.MessageTraceWrapper(basic_get, 'library', 'Consume', 'Queue', 'x')

method_frame, header_frame, body = wrapped_basic_get('queue')
Expand All @@ -268,6 +268,6 @@ method_frame, header_frame, body = wrapped_basic_get('queue')

An example of using the `wrap_message_trace` path-based wrapper:

```
```py
wrap_message_trace('module', 'Foo.bar', 'library', 'Produce', 'Exchange', 'x')
```

0 comments on commit 3cecfa3

Please sign in to comment.