The Bearer Agent allows you to update the configuration in your code using the following syntax after installing and requiring the bearer-agent
:
bearer_agent.init(secret_key="YOUR_SECRET_KEY",strip_sensitive_data=True,environment="staging",disabled=False)
The following is a list of all available configuration options.
Property | Value |
secret_key | Your Bearer Secret Key (required) |
disabled | When set, the Bearer agent is disabled |
environment | Sets the name of the environment to be used in the dashboard. (defaults to |
strip_sensitive_data | Remove sensitive data before sending it to bearer.sh (defaults to |
strip_sensitive_keys | Regular expression used for key name values to strip (see defaults) |
strip_sensitive_regex | Regular expression used for value stripping (see defaults) |
For more on using the strip_sensitive_data
, strip_sensitive_keys
, and strip_sensitive_regex
configuration properties see Keep your Data Protected.
Bearer uses the environment name to differentiate between agents linked to an application in the Bearer Dashboard. By default, the agent will be associated with the "development" environment. To define an environment name, use the environment
property when configuring the agent during initialization.