Skip to content

Commit

Permalink
docs: Fixed images in markdown tutorials (#2153)
Browse files Browse the repository at this point in the history
  • Loading branch information
bizob2828 authored Apr 18, 2024
2 parents 33af646 + ea8358f commit ef14948
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 42 deletions.
8 changes: 2 additions & 6 deletions examples/shim/Context-Preservation.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,7 @@ transaction, the work done in `secondJob` would be incorrectly associated with
`'firstTransaction'`. Now that we have a test case we can start writing our
instrumentation for the work queue. This behavior can be seen in the UI:

<div style="text-align:center">
[<img src="./confounded-txns.png" style="width:100%" />][5]
</div>
[<img src="./confounded-txns.png" alt="confounded transactions" style="text-align:center;width:100%" />][5]

The instrumentation will be relatively simple, we just need to call {@link
Shim#bindSegment} on the jobs as they are passed in. The purpose of this
Expand Down Expand Up @@ -308,9 +306,7 @@ The correct instrumentation should be noticeable in the UI as now both
transactions appear, and the timer used by the work queue appears as a segment
in `'firstTransaction'`

<div style="text-align:center">
[<img src="./proper-txns.png" style="width:100%" />][5]
</div>
[<img src="./proper-txns.png" alt="transaction breakdown" style="text-align:center;width:100%" />][5]


### Questions?
Expand Down
12 changes: 3 additions & 9 deletions examples/shim/Datastore-Simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ server.get('/shim-demo', function(req, res, next) {
})
```

<div style="text-align:center">
[![transaction breakdown](./tx-breakdown.png)][4]
</div>
[<img src="./tx-breakdown.png" alt="transaction breakdown" style="text-align:center;width:100%" />][4]


--------------------------------------------------------------------------------
Expand Down Expand Up @@ -101,9 +99,7 @@ one of the [predefined datastore names]{@link DatastoreShim.DATASTORE_NAMES},
but we could have also passed in a string like `"Cassandra"` instead. This name
will show up on the [New Relic APM Databases page][2] like this:

<div style="text-align:center">
[![databases overview](./db-overview.png)][2]
</div>
[<img src="./db-overview.png" alt="databases overview" style="text-align:center;width:100%" />][2]


### Recording Operations
Expand All @@ -125,9 +121,7 @@ them to name our metrics. We can see the results of this on APM in the
transaction breakdown graph. The green layer labeled `Cassandra connect` is from
our recorded operation.

<div style="text-align:center">
[![transaction breakdown](./tx-breakdown.png)][4]
</div>
[<img src="./tx-breakdown.png" alt="transaction breakdown" style="text-align:center;width:100%" />][4]

The third parameter is the ["spec" for this operation]{@link OperationSpec}.
Specs are simply objects that describe the interface for a function. For
Expand Down
4 changes: 1 addition & 3 deletions examples/shim/Instrumentation-Basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ Instrumentation for Node.js holds two purposes. The first is to give users
detailed information about what happens on their server. The more things
instrumented, the more detailed this graph can be.

<div style="text-align:center">
![application overview](./overview.png)
</div>
[<img src="./overview.png" alt="application overview" style="text-align:center;width:100%" />]

The second purpose is to maintain the transaction context. In order to properly
associate chunks of work with the correct transactions we must link the context
Expand Down
20 changes: 5 additions & 15 deletions examples/shim/Messaging-Simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ The first thing the instrumentation should specify is the name of the message br
shim.setLibrary(shim.RABBITMQ)
```

<div style="text-align:center">
<img src="./messaging-breakdown-table.png" alt="transaction breakdown"/>
</div>
[<img src="./messaging-breakdown-table.png" style="text-align:center;width:100$" alt="transaction breakdown"/>]

### Producing Messages

Expand Down Expand Up @@ -157,15 +155,11 @@ The `recordProduce` method wraps the `publish` function, so that when it's calle

The call would be displayed in the transaction trace as:

<div style="text-align:center">
<img src="./messaging-produce-segment.png" alt="transaction trace with produce segment"/>
</div>
[<img src="./messaging-produce-segment.png" style="text-align:center;width:100%" alt="transaction trace with produce segment"/>]

The transaction trace window also has the Messages tab, which shows all of the messages produced or consumed during the transaction:

<div style="text-align:center">
<img src="./messaging-produce-messages.png" alt="transaction trace with produce segment"/>
</div>
[<img src="./messaging-produce-messages.png" style="text-align:center;width:100%" alt="transaction trace with produce segment"/>]

The agent will also record a metric that can be be queried in Insights. The format of the metric is: `MessageBroker/[libraryName]/Queue/Produce/Named/[queueName]`.

Expand Down Expand Up @@ -210,9 +204,7 @@ Similarly to the produce-messages case, `recordConsume` wraps the function used

The call would be displayed in the transaction trace as:

<div style="text-align:center">
<img src="./messaging-consume-segment.png" alt="transaction trace with consume segment"/>
</div>
[<img src="./messaging-consume-segment.png" style="text-align:center;width:100%" alt="transaction trace with consume segment"/>]

The agent will also record a metric that can be be queried in Insights. The format of the metric is `MessageBroker/[libraryName]/Queue/Produce/Named/[queueName]`.

Expand Down Expand Up @@ -250,9 +242,7 @@ The `messageHandler` parameter works the same as in the `recordConsume` case. Wh

Each message processing will be shown as a separate transaction:

<div style="text-align:center">
<img src="./messaging-consume-transaction.png" alt="message transaction"/>
</div>
[<img src="./messaging-consume-transaction.png" style="text-align:center;width:100%" alt="message transaction"/>]

### Cross application traces

Expand Down
13 changes: 4 additions & 9 deletions examples/shim/Webframework-Simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ attributes. It is also displayed in the Environment view.
shim.setFramework('MyCustom')
```
<div style="text-align:center">
![transaction breakdown](./breakdown-table-web-framework.png)
</div>
[<img src="./breakdown-table-web-framework.png" alt="transaction breakdown" style="text-align:center;width:100%" />]
### What to Record
Expand Down Expand Up @@ -128,9 +126,8 @@ the HTTP request or pass control to another middleware.
Since there can be many middlewares executed for a single request, it is useful to know
how much time is spent in each middleware when troubleshooting performance.
<div style="text-align:center">
![transaction breakdown](./tx-breakdown-web-api.png)
</div>
[<img src="./tx-breakdown-web-api.png" alt="transaction breakdown" style="text-align:center;width:100%" />]
There are two API functions related to middleware - {@link WebFrameworkShim#recordMiddleware}
and {@link WebFrameworkShim#wrapMiddlewareMounter}. Based on our web app code, we would
Expand Down Expand Up @@ -226,9 +223,7 @@ shim.recordRender(Server.prototype, 'render', {
})
```

<div style="text-align:center">
![view segment](./trace-summary-view.png)
</div>
[<img src="./trace-summary-view.png" alt="view segment" style="text-align:center;width:100%" />]

Note that in some cases (e.g. in Express) the `render` function may be directly
on the `req` object and may be invoked without accepting a callback. In this
Expand Down

0 comments on commit ef14948

Please sign in to comment.