Installing the Bearer Agent generally only takes a few minutes. You will need an account on Bearer.sh to obtain your secret key.
To enable the Bearer Agent within your application, you'll need to:
Install the Agent and initialize it in your application.
Set up any optional configuration settings.
bearer-agent to your
bundle to install the latest version of
Alternately, you can install the gem yourself:
gem install bearer-agent
Now, open your application's main script and initialize the Bearer agent at the top:
require 'bearer-agent'Bearer.init_config do |config|config.secret_key = "YOUR_BEARER_SECRET_KEY" # Required, string: Your Bearer Secret Keyend
Your Bearer Secret Key,
config.secret_key, can be found in the settings for your app on the Bearer Dashboard at Settings > Keys. Each application you have created in the Bearer Dashboard has its own unique key.
Now, you can start your application. All API calls will be monitored and available on your Bearer dashboard.
With the Agent set up, you can begin monitoring your APIs on the Bearer Dashboard. To learn more about the features available on the Dashboard and how to get started, explore our Get to Know the Dashboard documentation.
The Bearer agent communicates with Bearer servers through HTTPS. The Agent requires your firewall to allow outgoing connections to
agent.bearer.sh with port 443 (HTTPS).
By default, the Agent sends to the full payload of each HTTP request (including both the request and the response) to Bearer. By default and for your own security, the
Authorization header is filtered and will not be shared with Bearer.
The agent offers more options to reduce the amount of sensitive information sent to Bearer. To learn more about how to sanitize specific parts of your data, see the Keep your Data Protected documentation.