request.tesla events on your performance samples’ Event Timeline.
In the Event Timeline, you’ll see how much time Tesla spends making external API requests. This data may help inform you to move the API requests to a background job or introduce caching to help speed up performance and limit unnecessary API requests.
In the Slow API Requests performance view, you’ll be able to see aggregated throughput and average times for different kinds of HTTP requests. Follow the instructions in the Path Params Grouping section in order to improve the information shown in this view.
Configuration
Add theTesla.Middleware.Telemetry middleware to your module or client’s middleware chain, before any other middlewares:
Enhanced Grouping
By default, the AppSignal instrumentation for Tesla will group requests by the domain name they’re performed against. The path of the request will not be shown in AppSignal. However, by using certain Tesla middlewares, it’s possible to add more information about the request. The following sections describe each middleware’s behaviour separately, but it is also possible to use them together.Base URL Grouping
When using theBaseUrl middleware, the base URL provided, including its path, will be used for grouping, providing you with some additional insight into the target of the HTTP requests performed by Tesla:
GET https://api.example.com/v2/users, instead of just GET https://api.example.com, providing additional information about the requests that are being performed.
Path Params Grouping
When using thePathParams middleware, the URL given to Tesla for the request will be a template, with path parameters being passed separately:
PathParams is used, the URL template will be shown in AppSignal. Requests will appear as GET https://api.example.com/v2/users/:user/comments in the sample’s Event Timeline and in the Slow API Requests performance view, providing you with a detailed view of each request type that your client performs.
Disable Tesla Instrumentation
To disable the Tesla instrumentation, set theinstrument_tesla config option to false.