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

## Syntax

```
```py
newrelic.agent.message_transaction(library, destination_type, destination_name, application, routing_key=None, exchange_type=None, headers=None, queue_name=None, reply_to=None, correlation_id=None)
```

Expand All @@ -44,11 +44,11 @@ For an explanation of when these different calls should be used, see [Different

### Parameters for message_transaction and MessageTransaction [#decorator-context-mgr-parameters]

```
```py
newrelic.agent.message_transaction(library, destination_type, destination_name, application, routing_key=None, exchange_type=None, headers=None, queue_name=None, reply_to=None, correlation_id=None)
```

```
```py
newrelic.agent.MessageTransaction(library, destination_type, destination_name, application, routing_key=None, exchange_type=None, headers=None, queue_name=None, reply_to=None, correlation_id=None)
```

Expand Down Expand Up @@ -192,7 +192,7 @@ The decorator and context manager use these parameters:

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

```
```py
newrelic.agent.MessageTransactionWrapper(wrapped, library, destination_type, destination_name, application, routing_key=None, exchange_type=None, headers=None, queue_name=None, reply_to=None, correlation_id=None)
```

Expand Down Expand Up @@ -228,7 +228,7 @@ The `MessageTransactionWrapper` takes all of the same parameters as the [decorat

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

```
```py
newrelic.agent.wrap_message_transaction(module, object_path, library, destination_type, destination_name, application, routing_key=None, exchange_type=None, headers=None, queue_name=None, reply_to=None, correlation_id=None)
```

Expand Down Expand Up @@ -284,7 +284,7 @@ The decorator `message_transaction` returns a `MessageTransactionWrapper` partia

An example of the decorator:

```
```py
mt = message_transaction('library', 'Exchange', 'x', routing_key='foo.bar')

@mt
Expand All @@ -296,7 +296,7 @@ def foo():

An example using the context manager:

```
```py
def callback(method, properties, body):
with MessageTransaction('library', 'Exchange', 'x', application=app):
pass
Expand All @@ -306,7 +306,7 @@ def callback(method, properties, body):

An example using the wrapper:

```
```py
basic_consume_wrapper = newrelic.agent.MessageTransactionWrapper(basic_consume_register_callback, 'library', 'Queue', 'x')

method_frame, header_frame, body = basic_consume_wrapper('queue')
Expand All @@ -316,6 +316,6 @@ method_frame, header_frame, body = basic_consume_wrapper('queue')

An example using the path-based wrapper:

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

0 comments on commit 2d32808

Please sign in to comment.