Skip to main content

Load Data from Sentry to Microsoft SQL Server using dlt in Python

Need help deploying these pipelines, or figuring out how to run them in your data stack?

Join our Slack community or book a call with our support engineer Violetta.

Loading data from Sentry to Microsoft SQL Server can streamline your error monitoring and database management processes. Sentry is an error monitoring platform supporting over 100 languages and frameworks, designed to provide developers with actionable insights. Microsoft SQL Server is a relational database management system (RDBMS) that uses Transact-SQL for communication. By leveraging the open-source Python library dlt, you can efficiently transfer error monitoring data from Sentry to Microsoft SQL Server. This integration allows for comprehensive data analysis and improved application performance monitoring. For more details on Sentry, visit sentry.io.

dlt Key Features

- **Data Loading to Microsoft SQL Server**: Easily load data into Microsoft SQL Server using `dlt`. Follow the setup guide and install the necessary dependencies. [Learn more](https://dlthub.com/docs/dlt-ecosystem/destinations/mssql)
- **Alerting and Monitoring**: Set up alerts to monitor the health and status of your data pipelines. Integrate with tools like Sentry and Slack for notifications. [Learn more](https://dlthub.com/docs/running-in-production/alerting)
- **Governance Support**: Ensure data consistency and quality with schema enforcement, metadata utilization, and schema change alerts in `dlt` pipelines. [Learn more](https://dlthub.com/docs/build-a-pipeline-tutorial)
- **Tracing**: Enable rich tracing information for executed pipelines using Sentry. Get detailed error and transaction traces to debug and optimize your data workflows. [Learn more](https://dlthub.com/docs/running-in-production/tracing)
- **Data Types**: `dlt` supports a variety of data types including text, double, bool, timestamp, date, time, bigint, binary, complex, decimal, and wei. [Learn more](https://dlthub.com/docs/general-usage/schema)

Getting started with your pipeline locally

OpenAPI Source Generator dlt-init-openapi

This walkthrough makes use of the dlt-init-openapi generator cli tool. You can read more about it here. The code generated by this tool uses the dlt rest_api verified source, docs for this are here.

0. Prerequisites

dlt and dlt-init-openapi requires Python 3.9 or higher. Additionally, you need to have the pip package manager installed, and we recommend using a virtual environment to manage your dependencies. You can learn more about preparing your computer for dlt in our installation reference.

1. Install dlt and dlt-init-openapi

First you need to install the dlt-init-openapi cli tool.

pip install dlt-init-openapi

The dlt-init-openapi cli is a powerful generator which you can use to turn any OpenAPI spec into a dlt source to ingest data from that api. The quality of the generator source is dependent on how well the API is designed and how accurate the OpenAPI spec you are using is. You may need to make tweaks to the generated code, you can learn more about this here.

# generate pipeline
# NOTE: add_limit adds a global limit, you can remove this later
# NOTE: you will need to select which endpoints to render, you
# can just hit Enter and all will be rendered.
dlt-init-openapi sentry --url https://raw.githubusercontent.com/getsentry/sentry-api-schema/main/openapi-derefed.json --global-limit 2
cd sentry_pipeline
# install generated requirements
pip install -r requirements.txt

The last command will install the required dependencies for your pipeline. The dependencies are listed in the requirements.txt:

dlt>=0.4.12

You now have the following folder structure in your project:

sentry_pipeline/
├── .dlt/
│ ├── config.toml # configs for your pipeline
│ └── secrets.toml # secrets for your pipeline
├── rest_api/ # The rest api verified source
│ └── ...
├── sentry/
│ └── __init__.py # TODO: possibly tweak this file
├── sentry_pipeline.py # your main pipeline script
├── requirements.txt # dependencies for your pipeline
└── .gitignore # ignore files for git (not required)

1.1. Tweak sentry/__init__.py

This file contains the generated configuration of your rest_api. You can continue with the next steps and leave it as is, but you might want to come back here and make adjustments if you need your rest_api source set up in a different way. The generated file for the sentry source will look like this:

Click to view full file (1718 lines)

from typing import List

import dlt
from dlt.extract.source import DltResource
from rest_api import rest_api_source
from rest_api.typing import RESTAPIConfig


@dlt.source(name="sentry_source", max_table_nesting=2)
def sentry_source(
token: str = dlt.secrets.value,
base_url: str = dlt.config.value,
) -> List[DltResource]:

# source configuration
source_config: RESTAPIConfig = {
"client": {
"base_url": base_url,
"auth": {

"type": "bearer",
"token": token,

},
"paginator": {
"type":
"offset",
"limit":
20,
"offset_param":
"start",
"limit_param":
"per_page",
"total_path":
"",
"maximum_offset":
20,
},
},
"resources":
[
# Returns all Spike Protection Notification Actions for an organization. Notification Actions notify a set of members when an action has been triggered through a notification service such as Slack or Sentry. For example, organization owners and managers can receive an email when a spike occurs. You can use either the `project` or `projectSlug` query parameter to filter for certain projects. Note that if both are present, `projectSlug` takes priority.
{
"name": "list_spike_protection_notifications",
"table_name": "action",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/notifications/actions/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
# the parameters below can optionally be configured
# "project": "OPTIONAL_CONFIG",
# "project_id_or_slug": "OPTIONAL_CONFIG",
# "triggerType": "OPTIONAL_CONFIG",

},
}
},
# Returns a serialized Spike Protection Notification Action object. Notification Actions notify a set of members when an action has been triggered through a notification service such as Slack or Sentry. For example, organization owners and managers can receive an email when a spike occurs.
{
"name": "retrieve_a_spike_protection_notification_action",
"table_name": "action",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/notifications/actions/{action_id}/",
"params": {
"action_id": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Return a list of activations for a metric alert rule. An activation represents a single instance of an activated alert rule being triggered. It contains a date_added field which represents the time the alert was triggered. Activations can be filtered by start and end parameters to return activations with date_added that falls within the specified time window.
{
"name": "retrieve_activations_for_an_alert_rule",
"table_name": "activation",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/alert-rules/{alert_rule_id}/activations/",
"params": {
"alert_rule_id": {
"type": "resolve",
"resource": "list_an_organizations_metric_alert_rules",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Return a list of active metric alert rules bound to an organization. A metric alert rule is a configuration that defines the conditions for triggering an alert. It specifies the metric type, function, time interval, and threshold values that determine when an alert should be triggered. Metric alert rules are used to monitor and notify you when certain metrics, like error count, latency, or failure rate, cross a predefined threshold. These rules help you proactively identify and address issues in your project.
{
"name": "list_an_organizations_metric_alert_rules",
"table_name": "alert_rule",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/alert-rules/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},

},
}
},
# Return details on an individual metric alert rule. A metric alert rule is a configuration that defines the conditions for triggering an alert. It specifies the metric type, function, time interval, and threshold values that determine when an alert should be triggered. Metric alert rules are used to monitor and notify you when certain metrics, like error count, latency, or failure rate, cross a predefined threshold. These rules help you proactively identify and address issues in your project.
{
"name": "retrieve_a_metric_alert_rule_for_an_organization",
"table_name": "alert_rule",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/alert-rules/{alert_rule_id}/",
"params": {
"alert_rule_id": {
"type": "resolve",
"resource": "list_an_organizations_metric_alert_rules",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Retrieve a list of check-ins for a monitor
{
"name": "retrieve_check_ins_for_a_monitor",
"table_name": "checkin",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/monitors/{monitor_id_or_slug}/checkins/",
"params": {
"monitor_id_or_slug": {
"type": "resolve",
"resource": "retrieve_monitors_for_an_organization",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Retrieve a list of check-ins for a monitor
{
"name": "retrieve_check_ins_for_a_monitor_by_project",
"table_name": "checkin",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/monitors/{monitor_id_or_slug}/checkins/",
"params": {
"monitor_id_or_slug": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"project_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Retrieve a collection of RRWeb DOM node-ids and the timestamp they were clicked.
{
"name": "list_clicked_nodes",
"table_name": "click",
"endpoint": {
"data_selector": "data",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/replays/{replay_id}/clicks/",
"params": {
"replay_id": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"project_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "cursor": "OPTIONAL_CONFIG",
# "environment": "OPTIONAL_CONFIG",
# "per_page": "OPTIONAL_CONFIG",
# "query": "OPTIONAL_CONFIG",

},
}
},
# Return a list of commits for a given repository.
{
"name": "list_a_repositorys_commits",
"table_name": "commit",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/repos/{repo_id}/commits/",
"params": {
"repo_id": {
"type": "resolve",
"resource": "list_an_organizations_repositories",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# List an organization release's commits.
{
"name": "list_an_organization_releases_commits",
"table_name": "commit",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/releases/{version}/commits/",
"params": {
"version": {
"type": "resolve",
"resource": "list_an_organizations_releases",
"field": "version",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# List a project release's commits.
{
"name": "list_a_project_releases_commits",
"table_name": "commit",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/{version}/commits/",
"params": {
"version": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"project_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Retrieve files changed in a release's commits
{
"name": "retrieve_files_changed_in_a_releases_commits",
"table_name": "commitfile",
"endpoint": {
"path": "/api/0/organizations/{organization_id_or_slug}/releases/{version}/commitfiles/",
"params": {
"version": {
"type": "resolve",
"resource": "list_an_organizations_releases",
"field": "version",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Return a list of deploys for a given release.
{
"name": "list_a_releases_deploys",
"table_name": "deploy",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/releases/{version}/deploys/",
"params": {
"version": {
"type": "resolve",
"resource": "list_an_organizations_releases",
"field": "version",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Retrieve a list of debug information files for a given project.
{
"name": "list_a_projects_debug_information_files",
"table_name": "dsym",
"endpoint": {
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/files/dsyms/",
"params": {
"project_id_or_slug": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Lists an organization's environments.
{
"name": "list_an_organizations_environments",
"table_name": "environment",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/environments/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
# the parameters below can optionally be configured
# "visibility": "OPTIONAL_CONFIG",

},
}
},
# Retrieves discover (also known as events) data for a given organization. **Eventsv2 Deprecation Note**: Users who may be using the `eventsv2` endpoint should update their requests to the `events` endpoint outline in this document. The `eventsv2` endpoint is not a public endpoint and has no guaranteed availability. If you are not making any API calls to `eventsv2`, you can safely ignore this. Changes between `eventsv2` and `events` include: - Field keys in the response now match the keys in the requested `field` param exactly. - The `meta` object in the response now shows types in the nested `field` object. Aside from the url change, there are no changes to the request payload itself. **Note**: This endpoint is intended to get a table of results, and is not for doing a full export of data sent to Sentry. The `field` query parameter determines what fields will be selected in the `data` and `meta` keys of the endpoint response. - The `data` key contains a list of results row by row that match the `query` made - The `meta` key contains information about the response, including the unit or type of the fields requested
{
"name": "query_discover_events_in_table_format",
"table_name": "event",
"endpoint": {
"data_selector": "data",
"path": "/api/0/organizations/{organization_id_or_slug}/events/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
"field": "FILL_ME_IN", # TODO: fill in required query parameter
# the parameters below can optionally be configured
# "end": "OPTIONAL_CONFIG",
# "environment": "OPTIONAL_CONFIG",
# "project": "OPTIONAL_CONFIG",
# "statsPeriod": "OPTIONAL_CONFIG",
# "query": "OPTIONAL_CONFIG",
# "sort": "OPTIONAL_CONFIG",

},
}
},
# Return details on an individual event.
{
"name": "retrieve_an_event_for_a_project",
"table_name": "event",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/events/{event_id}/",
"params": {
"event_id": {
"type": "resolve",
"resource": "list_a_projects_error_events",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"project_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Return a list of error events bound to a project.
{
"name": "list_a_projects_error_events",
"table_name": "event",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/events/",
"params": {
"project_id_or_slug": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "full": "OPTIONAL_CONFIG",
# "cursor": "OPTIONAL_CONFIG",

},
}
},
# This endpoint lists an issue's events.
{
"name": "list_an_issues_events",
"table_name": "event",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/events/",
"params": {
"issue_id": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "full": "OPTIONAL_CONFIG",

},
}
},
# This resolves an event ID to the project slug and internal issue ID and internal event ID.
{
"name": "resolve_an_event_id",
"table_name": "eventid",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/eventids/{event_id}/",
"params": {
"event_id": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Return a list of files for a given release.
{
"name": "list_an_organizations_release_files",
"table_name": "file",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/releases/{version}/files/",
"params": {
"version": {
"type": "resolve",
"resource": "list_an_organizations_releases",
"field": "version",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Return a list of files for a given release.
{
"name": "list_a_projects_release_files",
"table_name": "file",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/{version}/files/",
"params": {
"version": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"project_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Retrieve a file for a given release.
{
"name": "retrieve_an_organization_releases_file",
"table_name": "file",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/releases/{version}/files/{file_id}/",
"params": {
"file_id": {
"type": "resolve",
"resource": "list_an_organizations_release_files",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"version": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "download": "OPTIONAL_CONFIG",

},
}
},
# Retrieve a file for a given release.
{
"name": "retrieve_a_project_releases_file",
"table_name": "file",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/{version}/files/{file_id}/",
"params": {
"file_id": {
"type": "resolve",
"resource": "list_a_projects_release_files",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"project_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"version": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "download": "OPTIONAL_CONFIG",

},
}
},
# Returns a paginated list of teams bound to a organization with a SCIM Groups GET Request. Note that the members field will only contain up to 10,000 members.
{
"name": "list_an_organizations_paginated_teams",
"table_name": "group",
"endpoint": {
"data_selector": "schemas",
"path": "/api/0/organizations/{organization_id_or_slug}/scim/v2/Groups",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
# the parameters below can optionally be configured
# "startIndex": "1",
# "count": "100",
# "filter": "OPTIONAL_CONFIG",
# "excludedAttributes": "OPTIONAL_CONFIG",

},
}
},
# Query an individual team with a SCIM Group GET Request. - Note that the members field will only contain up to 10000 members.
{
"name": "query_an_individual_team",
"table_name": "group",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/scim/v2/Groups/{team_id}",
"params": {
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"team_id": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# This endpoint lists an issue's hashes, which are the generated checksums used to aggregate individual events.
{
"name": "list_an_issues_hashes",
"table_name": "hash",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/hashes/",
"params": {
"issue_id": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "cursor": "OPTIONAL_CONFIG",

},
}
},
# Return a list of service hooks bound to a project.
{
"name": "list_a_projects_service_hooks",
"table_name": "hook",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/hooks/",
"params": {
"project_id_or_slug": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "cursor": "OPTIONAL_CONFIG",

},
}
},
# Return a service hook bound to a project.
{
"name": "retrieve_a_service_hook",
"table_name": "hook",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/hooks/{hook_id}/",
"params": {
"hook_id": {
"type": "resolve",
"resource": "list_a_projects_service_hooks",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"project_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Lists all the available Integrations for an Organization.
{
"name": "list_an_organizations_available_integrations",
"table_name": "integration",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/integrations/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
# the parameters below can optionally be configured
# "providerKey": "OPTIONAL_CONFIG",
# "features": "OPTIONAL_CONFIG",
# "includeConfig": "OPTIONAL_CONFIG",

},
}
},
# Return a list of issues (groups) bound to a project. All parameters are supplied as query string parameters. A default query of ``is:unresolved`` is applied. To return results with other statuses send an new query value (i.e. ``?query=`` for all results). The ``statsPeriod`` parameter can be used to select the timeline stats which should be present. Possible values are: ``""`` (disable),``"24h"``, ``"14d"``
{
"name": "list_a_projects_issues",
"table_name": "issue",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/issues/",
"params": {
"project_id_or_slug": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "statsPeriod": "OPTIONAL_CONFIG",
# "shortIdLookup": "OPTIONAL_CONFIG",
# "query": "OPTIONAL_CONFIG",
# "cursor": "OPTIONAL_CONFIG",

},
}
},
# Return details on an individual issue. This returns the basic stats for the issue (title, last seen, first seen), some overall numbers (number of comments, user reports) as well as the summarized event data.
{
"name": "retrieve_an_issue",
"table_name": "issue",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/",
"params": {
"issue_id": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Return a list of client keys bound to a project.
{
"name": "list_a_projects_client_keys",
"table_name": "key",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/keys/",
"params": {
"project_id_or_slug": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "cursor": "OPTIONAL_CONFIG",
# "status": "OPTIONAL_CONFIG",

},
}
},
# Return a client key bound to a project.
{
"name": "retrieve_a_client_key",
"table_name": "key",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/keys/{key_id}/",
"params": {
"key_id": {
"type": "resolve",
"resource": "list_a_projects_client_keys",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"project_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Retrieves the details of the latest event for an issue.
{
"name": "retrieve_the_latest_event_for_an_issue",
"table_name": "latest",
"endpoint": {
"data_selector": "errors",
"path": "/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/events/latest/",
"params": {
"issue_id": {
"type": "resolve",
"resource": "list_an_issues_events",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# List all organization members. Response includes pending invites that are approved by organization admins but waiting to be accepted by the invitee.
{
"name": "list_an_organizations_members",
"table_name": "member",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/members/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},

},
}
},
# Retrieve an organization member's details. Will return a pending invite as long as it's already approved.
{
"name": "retrieve_an_organization_member",
"table_name": "member",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/members/{member_id}/",
"params": {
"member_id": {
"type": "resolve",
"resource": "list_an_organizations_members",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Lists monitors, including nested monitor environments. May be filtered to a project or environment.
{
"name": "retrieve_monitors_for_an_organization",
"table_name": "monitor",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/monitors/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
# the parameters below can optionally be configured
# "project": "OPTIONAL_CONFIG",
# "environment": "OPTIONAL_CONFIG",
# "owner": "OPTIONAL_CONFIG",

},
}
},
# Retrieves details for a monitor.
{
"name": "retrieve_a_monitor",
"table_name": "monitor",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/monitors/{monitor_id_or_slug}/",
"params": {
"monitor_id_or_slug": {
"type": "resolve",
"resource": "retrieve_monitors_for_an_organization",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "environment": "OPTIONAL_CONFIG",

},
}
},
# Retrieves details for a monitor.
{
"name": "retrieve_a_monitor_for_a_project",
"table_name": "monitor",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/monitors/{monitor_id_or_slug}/",
"params": {
"monitor_id_or_slug": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"project_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Retrieves the details of the oldest event for an issue.
{
"name": "retrieve_the_oldest_event_for_an_issue",
"table_name": "oldest",
"endpoint": {
"data_selector": "errors",
"path": "/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/events/oldest/",
"params": {
"issue_id": {
"type": "resolve",
"resource": "list_an_issues_events",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Return a list of organizations available to the authenticated session in a region. This is particularly useful for requests with a user bound context. For API key-based requests this will only return the organization that belongs to the key.
{
"name": "list_your_organizations",
"table_name": "organization",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/",
"params": {
# the parameters below can optionally be configured
# "owner": "OPTIONAL_CONFIG",
# "cursor": "OPTIONAL_CONFIG",
# "query": "OPTIONAL_CONFIG",
# "sortBy": "OPTIONAL_CONFIG",

},
}
},
# Return details on an individual organization including various details such as membership access, features, and teams.
{
"name": "retrieve_an_organization",
"table_name": "organization",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},

},
}
},
# Returns details on a project's ownership configuration.
{
"name": "retrieve_ownership_configuration_for_a_project",
"table_name": "ownership",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/ownership/",
"params": {
"project_id_or_slug": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Return a list of projects bound to a organization.
{
"name": "list_an_organizations_projects",
"table_name": "project",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/projects/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
# the parameters below can optionally be configured
# "cursor": "OPTIONAL_CONFIG",

},
}
},
# Return details on an individual project.
{
"name": "retrieve_a_project",
"table_name": "project",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/",
"params": {
"project_id_or_slug": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Return a list of projects bound to a team.
{
"name": "list_a_teams_projects",
"table_name": "project",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/projects/",
"params": {
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"team_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "cursor": "OPTIONAL_CONFIG",

},
}
},
# Return a list of projects available to the authenticated session.
{
"name": "list_your_projects",
"table_name": "project",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/",
"params": {
# the parameters below can optionally be configured
# "cursor": "OPTIONAL_CONFIG",

},
}
},
# Return a collection of replay recording segments.
{
"name": "list_recording_segments",
"table_name": "recording_segment",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/replays/{replay_id}/recording-segments/",
"params": {
"replay_id": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"project_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "cursor": "OPTIONAL_CONFIG",
# "per_page": "OPTIONAL_CONFIG",

},
}
},
# Return a replay recording segment.
{
"name": "fetch_recording_segment",
"table_name": "recording_segment",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/replays/{replay_id}/recording-segments/{segment_id}/",
"params": {
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"project_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"replay_id": "FILL_ME_IN", # TODO: fill in required path parameter
"segment_id": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Return a list of trusted relays bound to an organization. If the organization doesn't have Relay usage enabled it returns a 404.
{
"name": "list_an_organizations_trusted_relays",
"table_name": "relay_usage",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/relay_usage/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},

},
}
},
# Return a list of releases for a given organization.
{
"name": "list_an_organizations_releases",
"table_name": "release",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/releases/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
# the parameters below can optionally be configured
# "query": "OPTIONAL_CONFIG",

},
}
},
# Return a release for a given organization.
{
"name": "retrieve_an_organizations_releases",
"table_name": "release",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/releases/{version}/",
"params": {
"version": {
"type": "resolve",
"resource": "list_an_organizations_releases",
"field": "version",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# **`[WARNING]`**: This API is an experimental Alpha feature and is subject to change! List all derived statuses of releases that fall within the provided start/end datetimes. Constructs a response key'd off \{`release_version`\}-\{`project_slug`\} that lists thresholds with their status for *specified* projects. Each returned enriched threshold will contain the full serialized `release_threshold` instance as well as it's derived health statuses.
{
"name": "retrieve_statuses_of_release_thresholds_alpha",
"table_name": "release_threshold_status",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/release-threshold-statuses/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
"start": "FILL_ME_IN", # TODO: fill in required query parameter
"end": "FILL_ME_IN", # TODO: fill in required query parameter
# the parameters below can optionally be configured
# "environment": "OPTIONAL_CONFIG",
# "projectSlug": "OPTIONAL_CONFIG",
# "release": "OPTIONAL_CONFIG",

},
}
},
# Return a list of replays belonging to an organization.
{
"name": "list_an_organizations_replays",
"table_name": "replay",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/replays/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
# the parameters below can optionally be configured
# "statsPeriod": "OPTIONAL_CONFIG",
# "end": "OPTIONAL_CONFIG",
# "field": "OPTIONAL_CONFIG",
# "project": "OPTIONAL_CONFIG",
# "environment": "OPTIONAL_CONFIG",
# "sort": "OPTIONAL_CONFIG",
# "query": "OPTIONAL_CONFIG",
# "cursor": "OPTIONAL_CONFIG",

},
}
},
# Return details on an individual replay.
{
"name": "retrieve_a_replay_instance",
"table_name": "replay",
"endpoint": {
"data_selector": "trace_ids",
"path": "/api/0/organizations/{organization_id_or_slug}/replays/{replay_id}/",
"params": {
"replay_id": {
"type": "resolve",
"resource": "list_an_organizations_replays",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "statsPeriod": "OPTIONAL_CONFIG",
# "end": "OPTIONAL_CONFIG",
# "field": "OPTIONAL_CONFIG",
# "project": "OPTIONAL_CONFIG",
# "environment": "OPTIONAL_CONFIG",
# "sort": "OPTIONAL_CONFIG",
# "query": "OPTIONAL_CONFIG",
# "cursor": "OPTIONAL_CONFIG",

},
}
},
# Return a count of replays for the given issue or transaction id.
{
"name": "return_a_count_of_replays",
"table_name": "replay_count",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/replay-count/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
# the parameters below can optionally be configured
# "end": "OPTIONAL_CONFIG",
# "environment": "OPTIONAL_CONFIG",
# "start": "OPTIONAL_CONFIG",
# "statsPeriod": "OPTIONAL_CONFIG",
# "project": "OPTIONAL_CONFIG",
# "query": "OPTIONAL_CONFIG",

},
}
},
# Return a list of selectors for a given organization.
{
"name": "list_an_organizations_selectors",
"table_name": "replay_selector",
"endpoint": {
"data_selector": "data",
"path": "/api/0/organizations/{organization_id_or_slug}/replay-selectors/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
# the parameters below can optionally be configured
# "environment": "OPTIONAL_CONFIG",
# "statsPeriod": "OPTIONAL_CONFIG",
# "end": "OPTIONAL_CONFIG",
# "project": "OPTIONAL_CONFIG",
# "sort": "OPTIONAL_CONFIG",
# "cursor": "OPTIONAL_CONFIG",
# "query": "OPTIONAL_CONFIG",

},
}
},
# Return a list of version control repositories for a given organization.
{
"name": "list_an_organizations_repositories",
"table_name": "repo",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/repos/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},

},
}
},
# Return a list of active issue alert rules bound to a project. An issue alert rule triggers whenever a new event is received for any issue in a project that matches the specified alert conditions. These conditions can include a resolved issue re-appearing or an issue affecting many users. Alert conditions have three parts: - Triggers: specify what type of activity you'd like monitored or when an alert should be triggered. - Filters: help control noise by triggering an alert only if the issue matches the specified criteria. - Actions: specify what should happen when the trigger conditions are met and the filters match.
{
"name": "list_a_projects_issue_alert_rules",
"table_name": "rule",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/rules/",
"params": {
"project_id_or_slug": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Return details on an individual issue alert rule. An issue alert rule triggers whenever a new event is received for any issue in a project that matches the specified alert conditions. These conditions can include a resolved issue re-appearing or an issue affecting many users. Alert conditions have three parts: - Triggers - specify what type of activity you'd like monitored or when an alert should be triggered. - Filters - help control noise by triggering an alert only if the issue matches the specified criteria. - Actions - specify what should happen when the trigger conditions are met and the filters match.
{
"name": "retrieve_an_issue_alert_rule_for_a_project",
"table_name": "rule",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/rules/{rule_id}/",
"params": {
"rule_id": {
"type": "resolve",
"resource": "list_a_projects_issue_alert_rules",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"project_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Return a list of integration platform installations for a given organization.
{
"name": "list_an_organizations_integration_platform_installations",
"table_name": "sentry_app_installation",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/sentry-app-installations/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},

},
}
},
# Returns a time series of release health session statistics for projects bound to an " "organization. The interval and date range are subject to certain restrictions and rounding " "rules. The date range is rounded to align with the interval, and is rounded to at least one " "hour. The interval can at most be one day and at least one hour currently. It has to cleanly " "divide one day, for rounding reasons. Because of technical limitations, this endpoint returns " "at most 10000 data points. For example, if you select a 90 day window grouped by releases, " "you will see at most `floor(10k / (90 + 1)) = 109` releases. To get more results, reduce the " "`statsPeriod`."
{
"name": "retrieve_release_health_session_statistics",
"table_name": "session",
"endpoint": {
"data_selector": "intervals",
"path": "/api/0/organizations/{organization_id_or_slug}/sessions/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
"field": "FILL_ME_IN", # TODO: fill in required query parameter
# the parameters below can optionally be configured
# "end": "OPTIONAL_CONFIG",
# "environment": "OPTIONAL_CONFIG",
# "statsPeriod": "OPTIONAL_CONFIG",
# "project": "OPTIONAL_CONFIG",
# "interval": "OPTIONAL_CONFIG",
# "groupBy": "OPTIONAL_CONFIG",
# "orderBy": "OPTIONAL_CONFIG",
# "includeTotals": "OPTIONAL_CONFIG",
# "includeSeries": "OPTIONAL_CONFIG",
# "query": "OPTIONAL_CONFIG",

},
}
},
# This resolves a short ID to the project slug and internal issue ID.
{
"name": "resolve_a_short_id",
"table_name": "shortid",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/shortids/{short_id}/",
"params": {
"short_id": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Return a list of source map errors for a given event.
{
"name": "debug_issues_related_to_source_maps_for_a_given_event",
"table_name": "source_map_debug",
"endpoint": {
"data_selector": "errors",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/events/{event_id}/source-map-debug/",
"params": {
"event_id": {
"type": "resolve",
"resource": "list_a_projects_error_events",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"project_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"frame_idx": "FILL_ME_IN", # TODO: fill in required query parameter
"exception_idx": "FILL_ME_IN", # TODO: fill in required query parameter

},
}
},
# Return a set of points representing a normalized timestamp and the number of events seen in the period. Query ranges are limited to Sentry’s configured time-series resolutions.
{
"name": "retrieve_event_counts_for_a_team",
"table_name": "stat",
"endpoint": {
"data_selector": "$",
"path": "/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/stats/",
"params": {
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"team_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "stat": "OPTIONAL_CONFIG",
# "since": "OPTIONAL_CONFIG",
# "until": "OPTIONAL_CONFIG",
# "resolution": "OPTIONAL_CONFIG",

},
}
},
# Return a set of points representing a normalized timestamp and the number of events seen in the period. Query ranges are limited to Sentry's configured time-series resolutions.
{
"name": "retrieve_event_counts_for_a_project",
"table_name": "stat",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/stats/",
"params": {
"project_id_or_slug": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "stat": "OPTIONAL_CONFIG",
# "since": "OPTIONAL_CONFIG",
# "until": "OPTIONAL_CONFIG",
# "resolution": "OPTIONAL_CONFIG",

},
}
},
# Query summarized event counts by project for your Organization. Also see https://docs.sentry.io/api/organizations/retrieve-event-counts-for-an-organization-v2/ for reference.
{
"name": "retrieve_an_organizations_events_count_by_project",
"table_name": "stats_summary",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "projects",
"path": "/api/0/organizations/{organization_id_or_slug}/stats-summary/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
"field": "FILL_ME_IN", # TODO: fill in required query parameter
# the parameters below can optionally be configured
# "statsPeriod": "OPTIONAL_CONFIG",
# "interval": "OPTIONAL_CONFIG",
# "start": "OPTIONAL_CONFIG",
# "end": "OPTIONAL_CONFIG",
# "project": "OPTIONAL_CONFIG",
# "category": "OPTIONAL_CONFIG",
# "outcome": "OPTIONAL_CONFIG",
# "reason": "OPTIONAL_CONFIG",
# "download": "OPTIONAL_CONFIG",

},
}
},
# Query event counts for your Organization. Select a field, define a date range, and group or filter by columns.
{
"name": "retrieve_event_counts_for_an_organization_v_2",
"table_name": "stats_v2",
"endpoint": {
"data_selector": "intervals",
"path": "/api/0/organizations/{organization_id_or_slug}/stats_v2/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
"groupBy": "FILL_ME_IN", # TODO: fill in required query parameter
"field": "FILL_ME_IN", # TODO: fill in required query parameter
# the parameters below can optionally be configured
# "statsPeriod": "OPTIONAL_CONFIG",
# "interval": "OPTIONAL_CONFIG",
# "start": "OPTIONAL_CONFIG",
# "end": "OPTIONAL_CONFIG",
# "project": "OPTIONAL_CONFIG",
# "category": "OPTIONAL_CONFIG",
# "outcome": "OPTIONAL_CONFIG",
# "reason": "OPTIONAL_CONFIG",

},
}
},
# List custom symbol sources configured for a project.
{
"name": "retrieve_a_projects_symbol_sources",
"table_name": "symbol_source",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/symbol-sources/",
"params": {
"project_id_or_slug": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "id": "OPTIONAL_CONFIG",

},
}
},
# Returns details for given tag key related to an issue.
{
"name": "retrieve_tag_details",
"table_name": "tag",
"primary_key": "key",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/tags/{key}/",
"params": {
"key": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"issue_id": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Returns a list of teams bound to a organization.
{
"name": "list_an_organizations_teams",
"table_name": "team",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/teams/",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
# the parameters below can optionally be configured
# "detailed": "OPTIONAL_CONFIG",
# "cursor": "OPTIONAL_CONFIG",

},
}
},
# Return details on an individual team.
{
"name": "retrieve_a_team",
"table_name": "team",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/",
"params": {
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"team_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "expand": "OPTIONAL_CONFIG",
# "collapse": "OPTIONAL_CONFIG",

},
}
},
# Returns a paginated list of members bound to a organization with a SCIM Users GET Request.
{
"name": "list_an_organizations_scim_members",
"table_name": "user",
"endpoint": {
"data_selector": "schemas",
"path": "/api/0/organizations/{organization_id_or_slug}/scim/v2/Users",
"params": {
"organization_id_or_slug": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
# the parameters below can optionally be configured
# "startIndex": "1",
# "count": "100",
# "filter": "OPTIONAL_CONFIG",
# "excludedAttributes": "OPTIONAL_CONFIG",

},
}
},
# Query an individual organization member with a SCIM User GET Request. - The `name` object will contain fields `firstName` and `lastName` with the values of `N/A`. Sentry's SCIM API does not currently support these fields but returns them for compatibility purposes.
{
"name": "query_an_individual_organization_member",
"table_name": "user",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/scim/v2/Users/{member_id}",
"params": {
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"member_id": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Return a list of users seen within this project.
{
"name": "list_a_projects_users",
"table_name": "user",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/users/",
"params": {
"project_id_or_slug": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
# the parameters below can optionally be configured
# "query": "OPTIONAL_CONFIG",

},
}
},
# Return a list of user feedback items within this project.
{
"name": "list_a_projects_user_feedback",
"table_name": "user_feedback",
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/user-feedback/",
"params": {
"project_id_or_slug": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Return a list of values associated with this key. The `query` parameter can be used to to perform a "contains" match on values. When [paginated](/api/pagination) can return at most 1000 values.
{
"name": "list_a_tags_values",
"table_name": "value",
"endpoint": {
"data_selector": "$",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/tags/{key}/values/",
"params": {
"key": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"project_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Returns details for given tag key related to an issue. When [paginated](/api/pagination) can return at most 1000 values.
{
"name": "list_a_tags_values_related_to_an_issue",
"table_name": "value",
"primary_key": "key",
"write_disposition": "merge",
"endpoint": {
"data_selector": "$",
"path": "/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/tags/{key}/values/",
"params": {
"key": {
"type": "resolve",
"resource": "list_your_organizations",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"issue_id": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
# Return a list of users who have viewed a replay.
{
"name": "get_list_of_user_who_have_viewed_a_replay",
"table_name": "viewed_by",
"endpoint": {
"data_selector": "data.viewed_by",
"path": "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/replays/{replay_id}/viewed-by/",
"params": {
"replay_id": {
"type": "resolve",
"resource": "list_your_projects",
"field": "id",
},
"organization_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter
"project_id_or_slug": "FILL_ME_IN", # TODO: fill in required path parameter

},
}
},
]
}

return rest_api_source(source_config)

2. Configuring your source and destination credentials

info

dlt-init-openapi will try to detect which authentication mechanism (if any) is used by the API in question and add a placeholder in your secrets.toml.

  • If you know your API needs authentication, but none was detected, you can learn more about adding authentication to the rest_api here.
  • OAuth detection currently is not supported, but you can supply your own authentication mechanism as outlined here.

The dlt cli will have created a .dlt directory in your project folder. This directory contains a config.toml file and a secrets.toml file that you can use to configure your pipeline. The automatically created version of these files look like this:

generated config.toml


[runtime]
log_level="INFO"

[sources.sentry]
# Base URL for the API
base_url = "https://sentry.io"

generated secrets.toml


[sources.sentry]
# secrets for your sentry source
token = "FILL ME OUT" # TODO: fill in your credentials

2.1. Adjust the generated code to your usecase

Further help setting up your source and destinations

At this time, the dlt-init-openapi cli tool will always create pipelines that load to a local duckdb instance. Switching to a different destination is trivial, all you need to do is change the destination parameter in sentry_pipeline.py to mssql and supply the credentials as outlined in the destination doc linked below.

  • Read more about setting up the rest_api source in our docs.
  • Read more about setting up the Microsoft SQL Server destination in our docs.

3. Running your pipeline for the first time

The dlt cli has also created a main pipeline script for you at sentry_pipeline.py, as well as a folder sentry that contains additional python files for your source. These files are your local copies which you can modify to fit your needs. In some cases you may find that you only need to do small changes to your pipelines or add some configurations, in other cases these files can serve as a working starting point for your code, but will need to be adjusted to do what you need them to do.

The main pipeline script will look something like this:


import dlt

from sentry import sentry_source


if __name__ == "__main__":
pipeline = dlt.pipeline(
pipeline_name="sentry_pipeline",
destination='duckdb',
dataset_name="sentry_data",
progress="log",
export_schema_path="schemas/export"
)
source = sentry_source()
info = pipeline.run(source)
print(info)

Provided you have set up your credentials, you can run your pipeline like a regular python script with the following command:

python sentry_pipeline.py

4. Inspecting your load result

You can now inspect the state of your pipeline with the dlt cli:

dlt pipeline sentry_pipeline info

You can also use streamlit to inspect the contents of your Microsoft SQL Server destination for this:

# install streamlit
pip install streamlit
# run the streamlit app for your pipeline with the dlt cli:
dlt pipeline sentry_pipeline show

5. Next steps to get your pipeline running in production

One of the beauties of dlt is, that we are just a plain Python library, so you can run your pipeline in any environment that supports Python >= 3.8. We have a couple of helpers and guides in our docs to get you there:

The Deploy section will show you how to deploy your pipeline to

  • Deploy with GitHub Actions: Automate your deployment process using GitHub Actions. Follow the steps in this guide to set up continuous integration and deployment.
  • Deploy with Airflow and Google Composer: Leverage Airflow and Google Composer for orchestrating your data pipelines. Learn how to deploy your pipeline with this tutorial.
  • Deploy with Google Cloud Functions: Utilize Google Cloud Functions for serverless deployment of your pipelines. Check out the detailed instructions in this guide.
  • Explore Other Deployment Options: Discover various other methods to deploy your dlt pipelines by browsing through the available resources.

The running in production section will teach you about:

  • Monitor your pipeline: Learn how to monitor your pipeline in production to ensure smooth operation and quick identification of issues. How to Monitor your pipeline
  • Set up alerts: Configure alerts to get notified about critical events and errors in your pipeline. Set up alerts
  • Set up tracing: Implement tracing to track the execution and performance of your pipeline for better debugging and optimization. And set up tracing

Available Sources and Resources

For this verified source the following sources and resources are available

Source Sentry

Sentry source provides comprehensive error monitoring, performance tracking, and user feedback data.

Resource NameWrite DispositionDescription
shortidappendShort identifier for various entities.
monitorappendMonitors for tracking the health and uptime of services.
fileappendFiles associated with issues or events.
userappendUser information and details.
groupappendGroups of related events or issues.
valueappendValues associated with various metrics or properties.
activationappendActivation status and details for features or integrations.
stats_summaryappendSummary of statistical data and metrics.
repoappendRepository information and details.
user_feedbackappendFeedback provided by users on issues or events.
release_threshold_statusappendStatus of release thresholds and their evaluations.
hookappendWebhooks and their configurations.
eventidappendUnique identifiers for events.
commitfileappendFiles associated with commits.
alert_ruleappendRules for generating alerts based on certain conditions.
projectappendProject information and configurations.
ownershipappendOwnership details for various entities.
recording_segmentappendSegments of recorded sessions or events.
sentry_app_installationappendInstallations of Sentry applications.
source_map_debugappendSource maps for debugging purposes.
deployappendDeployment details and statuses.
organizationappendOrganization information and configurations.
ruleappendRules for processing events and issues.
actionappendActions taken on events or issues.
eventappendEvents captured by Sentry.
replay_selectorappendSelectors for replaying events or sessions.
integrationappendIntegrations with other services and platforms.
environmentappendEnvironmental settings and configurations.
sessionappendUser sessions and their details.
dsymappendDebug symbols for crash reports.
latestappendLatest data points or records.
memberappendMembers of an organization or project.
relay_usageappendUsage statistics for Sentry relays.
viewed_byappendRecords of who viewed certain events or issues.
oldestappendOldest data points or records.
tagappendTags associated with events or issues.
commitappendCommit details and metadata.
replayappendReplays of events or sessions.
clickappendClick events captured by Sentry.
hashappendHashes for identifying unique events or issues.
releaseappendRelease information and details.
teamappendTeams within an organization.
keyappendAPI keys and their configurations.
stats_v2appendAdvanced statistical data and metrics.
checkinappendCheck-ins for monitoring tasks or processes.
replay_countappendCount of replays for events or sessions.
symbol_sourceappendSources of debug symbols.
statappendGeneral statistical data.
issueappendIssues tracked by Sentry.

Additional pipeline guides

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.