From ea8358f6fa5a6e001ad49cab93eab46d7d9a9eb3 Mon Sep 17 00:00:00 2001 From: Bob Evans Date: Thu, 18 Apr 2024 16:23:36 -0400 Subject: [PATCH] docs: Fixed images in markdown tutorials --- examples/shim/Context-Preservation.md | 8 ++------ examples/shim/Datastore-Simple.md | 12 +++--------- examples/shim/Instrumentation-Basics.md | 4 +--- examples/shim/Messaging-Simple.md | 20 +++++--------------- examples/shim/Webframework-Simple.md | 13 ++++--------- 5 files changed, 15 insertions(+), 42 deletions(-) diff --git a/examples/shim/Context-Preservation.md b/examples/shim/Context-Preservation.md index 091da071a5..8ec57c4e30 100644 --- a/examples/shim/Context-Preservation.md +++ b/examples/shim/Context-Preservation.md @@ -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: -
- [][5] -
+[confounded transactions][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 @@ -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'` -
- [][5] -
+[transaction breakdown][5] ### Questions? diff --git a/examples/shim/Datastore-Simple.md b/examples/shim/Datastore-Simple.md index 610de8f35d..9c5e184b16 100644 --- a/examples/shim/Datastore-Simple.md +++ b/examples/shim/Datastore-Simple.md @@ -67,9 +67,7 @@ server.get('/shim-demo', function(req, res, next) { }) ``` -
- [![transaction breakdown](./tx-breakdown.png)][4] -
+[transaction breakdown][4] -------------------------------------------------------------------------------- @@ -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: -
- [![databases overview](./db-overview.png)][2] -
+[databases overview][2] ### Recording Operations @@ -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. -
- [![transaction breakdown](./tx-breakdown.png)][4] -
+[transaction breakdown][4] The third parameter is the ["spec" for this operation]{@link OperationSpec}. Specs are simply objects that describe the interface for a function. For diff --git a/examples/shim/Instrumentation-Basics.md b/examples/shim/Instrumentation-Basics.md index 14b2b023e5..7b8558d344 100644 --- a/examples/shim/Instrumentation-Basics.md +++ b/examples/shim/Instrumentation-Basics.md @@ -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. -
- ![application overview](./overview.png) -
+[application overview] 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 diff --git a/examples/shim/Messaging-Simple.md b/examples/shim/Messaging-Simple.md index 507e75c444..3dff8bd0e2 100644 --- a/examples/shim/Messaging-Simple.md +++ b/examples/shim/Messaging-Simple.md @@ -108,9 +108,7 @@ The first thing the instrumentation should specify is the name of the message br shim.setLibrary(shim.RABBITMQ) ``` -
- transaction breakdown -
+[transaction breakdown] ### Producing Messages @@ -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: -
- transaction trace with produce segment -
+[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: -
- transaction trace with produce segment -
+[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]`. @@ -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: -
- transaction trace with consume segment -
+[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]`. @@ -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: -
- message transaction -
+[message transaction] ### Cross application traces diff --git a/examples/shim/Webframework-Simple.md b/examples/shim/Webframework-Simple.md index 6eb7fa93af..1540dcb1d8 100644 --- a/examples/shim/Webframework-Simple.md +++ b/examples/shim/Webframework-Simple.md @@ -85,9 +85,7 @@ attributes. It is also displayed in the Environment view. shim.setFramework('MyCustom') ``` -
- ![transaction breakdown](./breakdown-table-web-framework.png) -
+[transaction breakdown] ### What to Record @@ -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. -
- ![transaction breakdown](./tx-breakdown-web-api.png) -
+[transaction breakdown] + There are two API functions related to middleware - {@link WebFrameworkShim#recordMiddleware} and {@link WebFrameworkShim#wrapMiddlewareMounter}. Based on our web app code, we would @@ -226,9 +223,7 @@ shim.recordRender(Server.prototype, 'render', { }) ``` -
- ![view segment](./trace-summary-view.png) -
+[view segment] 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