steampipe plugin install sentry

Sentry + Steampipe

Sentry is a developer-first error tracking and performance monitoring platform that helps developers see what actually matters, solve quicker, and learn continuously about their applications.

Steampipe is an open-source zero-ETL engine to instantly query cloud APIs using SQL.

List your Sentry organizations:

select
id,
name,
is_default,
require_2fa,
open_membership,
default_role
from
sentry_organization;
+------------------+--------+------------+-------------+-----------------+--------------+
| id | name | is_default | require_2fa | open_membership | default_role |
+------------------+--------+------------+-------------+-----------------+--------------+
| 4504948474773504 | Turbot | false | false | true | admin |
+------------------+--------+------------+-------------+-----------------+--------------+

Documentation

Quick start

Install

Download and install the latest Sentry plugin:

steampipe plugin install sentry

Credentials

ItemDescription
CredentialsSentry requires an Auth Token for all requests.
PermissionsAuth tokens have the same permissions as the user who creates them, and if the user permissions change, the Auth token permissions also change.
RadiusEach connection represents a single Sentry Installation.
Resolution1. Credentials explicitly set in a steampipe config file (~/.steampipe/config/sentry.spc)
2. Credentials specified in environment variables, e.g., SENTRY_AUTH_TOKEN.

Configuration

Installing the latest sentry plugin will create a config file (~/.steampipe/config/sentry.spc) with a single connection named sentry:

Configure your account details in ~/.steampipe/config/sentry.spc:

connection "sentry" {
plugin = "sentry"
# `auth_token` - The Auth Token for accessing the APIs of Sentry. (Required).
# For more information on the Auth Token, please see https://docs.sentry.io/api/auth/.
# Can also be set with the SENTRY_AUTH_TOKEN environment variable.
# auth_token = "de70c93ecc594a0eb52463bd8f1e6d0b203615621e724762b3e5a9d82be291e9xfWdDNqwZPngS"
# If no credentials are specified, the plugin will use Sentry CLI authentication.
# `base_url` - The base URL of your Sentry instance. (Optional)
# Can also be set with the SENTRY_URL environment variable.
# Defaults to https://sentry.io/api/
# base_url = "https://sentry.company.com/"
}

Configuring Sentry Credentials

Authentication Token Credentials

You may specify the Auth Token to authenticate:

  • auth_token: Specify the authentication token.
connection "sentry" {
plugin = "sentry"
auth_token = "de70c93ecc594a0eb52463bd8f1e6d0b203615621e724762b3e5a9d82be291e9xfWdDNqwZPngS"
}

Credentials from Environment Variables

The Sentry plugin will use the Sentry environment variable to obtain credentials only if the auth_token is not specified in the connection:

export SENTRY_AUTH_TOKEN="de70c93ecc594a0eb52463bd8f1e6d0b203615621e724762b3e5a9d82be291e9xfWdDNqwZPngS"
export SENTRY_URL="https://sentry.company.com/"

Sentry CLI

If no credentials are specified and the environment variables are not set, the plugin will use the active credentials from the Sentry CLI. You can run sentry-cli login to set up these credentials.

connection "sentry" {
plugin = "sentry"
}

Postgres FDW

This plugin is available as a native Postgres FDW. Unlike Steampipe CLI, which ships with an embedded Postgres server instance, the Postgres FDW can be installed in any supported Postgres database version.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_postgres_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/postgres.sh)" -- sentry

The installer will prompt you for the plugin name and version, download and install the appropriate files for your OS, system architecture, and Postgres version.

To configure the Postgres FDW, you will create an extension, foreign server, and schema and import the foreign schema.

CREATE EXTENSION IF NOT EXISTS steampipe_postgres_sentry;
CREATE SERVER steampipe_sentry FOREIGN DATA WRAPPER steampipe_postgres_sentry OPTIONS (config '<your_config>');
CREATE SCHEMA sentry;
IMPORT FOREIGN SCHEMA sentry FROM SERVER steampipe_sentry INTO sentry;

SQLite Extension

This plugin is available as a SQLite Extension, making the tables available as SQLite virtual tables.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_sqlite_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/sqlite.sh)" -- sentry

The installer will prompt you for the plugin name, version, and destination directory. It will then determine the OS and system architecture, and it will download and install the appropriate package.

To configure the SQLite extension, load the extension module and then run the steampipe_configure_sentry function to configure it with plugin-specific options.

$ sqlite3
sqlite> .load ./steampipe_sqlite_extension_sentry.so
sqlite> select steampipe_configure_sentry('<your_config>');

Export

This plugin is available as a standalone Export CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- sentry

You can pass the configuration to the command with the --config argument:

steampipe_export_sentry --config '<your_config>' <table_name>