# Custom transactions not showing in dashboard

**URL:** <https://discuss.elastic.co/t/custom-transactions-not-showing-in-dashboard/294637>\
**Category:** APM\
**Tags:** rum\
**Created:** [January 17, 2022, 10:13pm UTC](https://discuss.elastic.co/t/custom-transactions-not-showing-in-dashboard/294637 "2022-01-17T22:13:18Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![covid19](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/covid19/32/90222_2.png) [@covid19](https://discuss.elastic.co/u/covid19)\
**Post date:** [January 17, 2022, 10:13pm UTC](https://discuss.elastic.co/t/custom-transactions-not-showing-in-dashboard/294637/1 "2022-01-17T22:13:18Z")

</div>

Hello,

I am trying to implement RUM APM in our frontend application. We use React SPA and first thing I noticed is that only initial page load is being recorded. To overcome that I added request interceptor to axios config in order to create custom transaction for each request but unfortunately it doesn't work. Nothing is shown in the dashboard.

rum.js

```auto
import { init as initApm } from "@elastic/apm-rum";
const apm = initApm({
  serviceName: "admin-dashboard",
  serviceVersion: "v1.0.0",
  environment: "local",
  serverUrl: "-- NOT SHARING --",
});

export default apm;

```

index.js contains

```auto
apm.setInitialPageLoadName("Admin Homepage")

```

axios interceptor

```auto
  private invoke<T>(
    method: string,
    url: string,
    data?: any,
    options?: IInvokeOptions,
    defaultResponseType = "json"
  ) {
    ...
    const transaction = apm.startTransaction(`API Request`, 'custom', { managed: true });
    const span = apm.startSpan(`${method} ${url}`, "external.http", { blocking: true });

    axios.interceptors.response.use(
      (response) => {

        if (transaction) {
          span.end();
          transaction.end();
        }

        return response;
      }
    )
    ...
  }

```

And in logs I get

 ![Screenshot 2022-01-17 at 23.10.24](https://us1.discourse-cdn.com/elastic/original/3X/7/b/7bcf7690536cb0eacc9a1cd8a9aa5a63703d1f1b.png)

The only transaction in elastic dashboard is "Admin Homepage" one which was set under initial page load name.

Any ideas what I am doing wrong or better ways to implement APM in SPA application?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Alberto\_Delgado](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alberto_delgado/32/98488_2.png) [@Alberto\_Delgado](https://discuss.elastic.co/u/Alberto_Delgado)\
**Post date:** [January 18, 2022, 2:36pm UTC](https://discuss.elastic.co/t/custom-transactions-not-showing-in-dashboard/294637/2 "2022-01-18T14:36:06Z")

</div>

Hi @covid19

Thanks for reaching out!

After checking the code and the logs attached everything seems fine from browser perspective. I have a couple of questions, though.

1. Could you check if the rum agent is sending data after those transactions end?

In your network tab you should see something like:

 ![Screenshot 2022-01-18 at 15.24.45](https://us1.discourse-cdn.com/elastic/original/3X/2/a/2a52441c63f8c6469d0d8640318aa4d3ad6aa137.png)

1. By default the dashboard only shows page-load transactions that's why you might not be seeing anything else, could you check if you have available the "custom" option in the selector?

 ![Screenshot 2022-01-18 at 15.33.40](https://us1.discourse-cdn.com/elastic/original/3X/8/a/8a4dd08376c3488c915ae975c297bda5655bf32d.png)

Thanks,  
Alberto

---

<div class="post-metadata">

**Author:** ![covid19](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/covid19/32/90222_2.png) [@covid19](https://discuss.elastic.co/u/covid19)\
**Post date:** [January 18, 2022, 3:36pm UTC](https://discuss.elastic.co/t/custom-transactions-not-showing-in-dashboard/294637/3 "2022-01-18T15:36:48Z")

</div>

Hi, thanks for answering.

Yes, I can see events being sent in network tab, that should be fine.

I actually didn't notice that type "page-load" is pre-selected. Actually for me it is hardcoded and I cannot change it.

 ![Screenshot 2022-01-18 at 16.33.05](https://us1.discourse-cdn.com/elastic/original/3X/2/8/281decea30b981788bf12bc42ea1fe14d8d8b639.png)

When I leave this dashboard and make a query over all APM services I can see "custom" transaction exists in my dashboard.

 ![Screenshot 2022-01-18 at 16.35.37](https://us1.discourse-cdn.com/elastic/original/3X/f/b/fb64d246fa8bfc018aff2054601315577041f28e.png)

---

<div class="post-metadata">

**Author:** ![Alberto\_Delgado](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alberto_delgado/32/98488_2.png) [@Alberto\_Delgado](https://discuss.elastic.co/u/Alberto_Delgado)\
**Post date:** [January 18, 2022, 3:58pm UTC](https://discuss.elastic.co/t/custom-transactions-not-showing-in-dashboard/294637/4 "2022-01-18T15:58:48Z")

</div>

Hi @covid19 ,

It is weird to see the value hardcoded rather than seeing a dropdown with options.

Could you copy here the HTML code associated with "type:page-load"?

I have additional questions to ask:

- What browser are you using? Could you check if the value appears also hardcoded in a different browser?
- What version of the Elastic Stack do you have installed?

Thanks,  
Alberto

---

<div class="post-metadata">

**Author:** ![covid19](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/covid19/32/90222_2.png) [@covid19](https://discuss.elastic.co/u/covid19)\
**Post date:** [January 19, 2022, 8:33am UTC](https://discuss.elastic.co/t/custom-transactions-not-showing-in-dashboard/294637/5 "2022-01-19T08:33:31Z")

</div>

Hey, I checked multiple browsers and it looks the same.

HTML:

```auto
<label class="euiFormLabel euiFormControlLayout__prepend">Type: page-load</label>

```

Elastic Stack version: 7.12.0

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 19, 2022, 8:33am UTC](https://discuss.elastic.co/t/custom-transactions-not-showing-in-dashboard/294637/6 "2022-01-19T08:33:31Z")

</div>

7.1 is [EOL](https://www.elastic.co/support/eol) and no longer supported. Please upgrade ASAP.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

---

<div class="post-metadata">

**Author:** ![covid19](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/covid19/32/90222_2.png) [@covid19](https://discuss.elastic.co/u/covid19)\
**Post date:** [January 19, 2022, 8:45am UTC](https://discuss.elastic.co/t/custom-transactions-not-showing-in-dashboard/294637/7 "2022-01-19T08:45:26Z")

</div>

I created a new deployment with, I guess, latest version 7.16.0 and dashboard looks a bit different but most important thing I can see dropdown now!

---

<div class="post-metadata">

**Author:** ![Alberto\_Delgado](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alberto_delgado/32/98488_2.png) [@Alberto\_Delgado](https://discuss.elastic.co/u/Alberto_Delgado)\
**Post date:** [January 19, 2022, 8:53am UTC](https://discuss.elastic.co/t/custom-transactions-not-showing-in-dashboard/294637/9 "2022-01-19T08:53:32Z")

</div>

Hi,

Glad to hear it!

The selector was added in the [release 7.13.0](https://www.elastic.co/guide/en/kibana/7.13/enhancements-and-bug-fixes-v7.13.0.html)

- _Moves the transaction type selector to the search bar_ [#96685](https://github.com/elastic/kibana/pull/96685)

---

<div class="post-metadata">

**Author:** ![covid19](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/covid19/32/90222_2.png) [@covid19](https://discuss.elastic.co/u/covid19)\
**Post date:** [January 19, 2022, 8:57am UTC](https://discuss.elastic.co/t/custom-transactions-not-showing-in-dashboard/294637/11 "2022-01-19T08:57:24Z")

</div>

Thanks for help!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 9, 2022, 4:58am UTC](https://discuss.elastic.co/t/custom-transactions-not-showing-in-dashboard/294637/12 "2022-02-09T04:58:01Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
