ScoutApm.Instruments.FinchTelemetry (scout_apm v2.0.0)

Copy Markdown

Telemetry handler for Finch HTTP client instrumentation.

Attaches to Finch telemetry events to track external HTTP requests:

  • HTTP requests appear as "HTTP" type layers (External Services)
  • Tracks URL, HTTP method, and response status code

Usage

In your application's start/2 function:

def start(_type, _args) do
  ScoutApm.Instruments.FinchTelemetry.attach()
  # ... rest of supervision tree
end

This will automatically instrument all Finch HTTP requests in your application, including those made through libraries built on Finch (like Req).

What's Tracked

  • Operation: HTTP/{method} (e.g., "HTTP/GET", "HTTP/POST")
  • URL: The full URL of the request (sanitized)
  • Status Code: The HTTP response status code

Configuration

Requests to Scout APM's own endpoints are automatically excluded from tracking.

Summary

Functions

Attaches telemetry handlers for Finch HTTP request events.

Detaches the telemetry handlers. Useful for testing.

Functions

attach()

Attaches telemetry handlers for Finch HTTP request events.

Call this once during application startup.

detach()

Detaches the telemetry handlers. Useful for testing.

handle_event(arg1, measurements, metadata, config)