Ruby Library

Created:
July 15, 2024
Updated:
September 6, 2024

Prerequisites

  • Ruby version 2.7 or greater.

Installation

  • Add this line to your application's Gemfile:

gem 'firetail'
  • And then execute:

$ `bundle install`
  • Or install it yourself with:

$ `gem install firetail`
  • Finally, if you are using Rails, run:

$ `rails g firetail:install`

This will configure your Rails app to use the FireTail gem as middleware and generate configuration and JSON schema templates.

Usage

  1. Setup your FireTail API key by setting the environment variable: FIRETAIL_API_KEY.
  2. Setup the FireTail backend URL by setting the environment variable FIRETAIL_URL.
    • Note: By default, FIRETAIL_URL uses Europe (EU) servers. For US-based customers, use https://api.logging.us-east-prod.us.firetail.app for the FIRETAIL_URL.
  3. Update config/schema.json to match your API endpoints.

Example OpenAPI Spec

Note: OpenAPI Spec must be in JSON format.


openapi: 3.0.1
info:
title: example spec
version: '0.1'
paths:
/greet:
    get:
    operationId: app.greeting
    responses:
        200:
        description: 200 response
        content: {}