diff --git a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/cdaf146a-9b75-49fd-9dd2-9d64a0bb4781.json b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/cdaf146a-9b75-49fd-9dd2-9d64a0bb4781.json
new file mode 100644
index 0000000000000..f88e4eedda821
--- /dev/null
+++ b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/cdaf146a-9b75-49fd-9dd2-9d64a0bb4781.json
@@ -0,0 +1,7 @@
+{
+ "sourceDefinitionId": "cdaf146a-9b75-49fd-9dd2-9d64a0bb4781",
+ "name": "Sentry",
+ "dockerRepository": "airbyte/source-sentry",
+ "dockerImageTag": "0.1.0",
+ "documentationUrl": "https://docs.airbyte.io/integrations/sources/sentry"
+}
diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml
index 541a18c32bb03..3e43cb9d37c04 100644
--- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml
+++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml
@@ -577,6 +577,16 @@
dockerImageTag: 0.1.2
documentationUrl: https://docs.airbyte.io/integrations/sources/zendesk-talk
sourceType: api
+- sourceDefinitionId: cdaf146a-9b75-49fd-9dd2-9d64a0bb4781
+ name: Sentry
+ dockerRepository: airbyte/source-sentry
+ dockerImageTag: 0.1.0
+ documentationUrl: https://docs.airbyte.io/integrations/sources/sentry
+- sourceDefinitionId: bb6afd81-87d5-47e3-97c4-e2c2901b1cf8
+ name: OneSignal
+ dockerRepository: airbyte/source-onesignal
+ dockerImageTag: 0.1.0
+ documentationUrl: https://docs.airbyte.io/integrations/sources/lever-onesignal
- name: Zoom
sourceDefinitionId: aea2fd0d-377d-465e-86c0-4fdc4f688e51
dockerRepository: airbyte/source-zoom-singer
diff --git a/airbyte-integrations/builds.md b/airbyte-integrations/builds.md
index d6c13ba9ec800..7a51d28433cf2 100644
--- a/airbyte-integrations/builds.md
+++ b/airbyte-integrations/builds.md
@@ -71,6 +71,7 @@
| Salesforce | [](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-salesforce) |
| Salesloft | [](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-salesloft) |
| Sendgrid | [](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-sendgrid) |
+| Sentry | [](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-sentry) |
| Shopify | [](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-shopify) |
| Slack | [](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-slack) |
| Smartsheets | [](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-smartsheets) |
diff --git a/airbyte-integrations/connectors/source-sentry/.dockerignore b/airbyte-integrations/connectors/source-sentry/.dockerignore
new file mode 100644
index 0000000000000..a5ed66c554120
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/.dockerignore
@@ -0,0 +1,7 @@
+*
+!Dockerfile
+!Dockerfile.test
+!main.py
+!source_sentry
+!setup.py
+!secrets
diff --git a/airbyte-integrations/connectors/source-sentry/.gitignore b/airbyte-integrations/connectors/source-sentry/.gitignore
new file mode 100644
index 0000000000000..d6e830be95797
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/.gitignore
@@ -0,0 +1 @@
+.python-version
\ No newline at end of file
diff --git a/airbyte-integrations/connectors/source-sentry/Dockerfile b/airbyte-integrations/connectors/source-sentry/Dockerfile
new file mode 100644
index 0000000000000..f743e7e20a611
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/Dockerfile
@@ -0,0 +1,38 @@
+FROM python:3.7.11-alpine3.14 as base
+
+# build and load all requirements
+FROM base as builder
+WORKDIR /airbyte/integration_code
+
+# upgrade pip to the latest version
+RUN apk --no-cache upgrade \
+ && pip install --upgrade pip \
+ && apk --no-cache add tzdata build-base
+
+
+COPY setup.py ./
+# install necessary packages to a temporary folder
+RUN pip install --prefix=/install .
+
+# build a clean environment
+FROM base
+WORKDIR /airbyte/integration_code
+
+# copy all loaded and built libraries to a pure basic image
+COPY --from=builder /install /usr/local
+# add default timezone settings
+COPY --from=builder /usr/share/zoneinfo/Etc/UTC /etc/localtime
+RUN echo "Etc/UTC" > /etc/timezone
+
+# bash is installed for more convenient debugging.
+RUN apk --no-cache add bash
+
+# copy payload code only
+COPY main.py ./
+COPY source_sentry ./source_sentry
+
+ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
+ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
+
+LABEL io.airbyte.version=0.1.0
+LABEL io.airbyte.name=airbyte/source-sentry
diff --git a/airbyte-integrations/connectors/source-sentry/README.md b/airbyte-integrations/connectors/source-sentry/README.md
new file mode 100644
index 0000000000000..bb0502804de66
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/README.md
@@ -0,0 +1,132 @@
+# Sentry Source
+
+This is the repository for the Sentry source connector, written in Python.
+For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/sentry).
+
+## Local development
+
+### Prerequisites
+**To iterate on this connector, make sure to complete this prerequisites section.**
+
+#### Minimum Python version required `= 3.7.0`
+
+#### Build & Activate Virtual Environment and install dependencies
+From this connector directory, create a virtual environment:
+```
+python -m venv .venv
+```
+
+This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your
+development environment of choice. To activate it from the terminal, run:
+```
+source .venv/bin/activate
+pip install -r requirements.txt
+pip install '.[tests]'
+```
+If you are in an IDE, follow your IDE's instructions to activate the virtualenv.
+
+Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is
+used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`.
+If this is mumbo jumbo to you, don't worry about it, just put your deps in `setup.py` but install using `pip install -r requirements.txt` and everything
+should work as you expect.
+
+#### Building via Gradle
+You can also build the connector in Gradle. This is typically used in CI and not needed for your development workflow.
+
+To build using Gradle, from the Airbyte repository root, run:
+```
+./gradlew :airbyte-integrations:connectors:source-sentry:build
+```
+
+#### Create credentials
+**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/sentry)
+to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_sentry/spec.json` file.
+Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
+See `integration_tests/sample_config.json` for a sample config file.
+
+**If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source sentry test creds`
+and place them into `secrets/config.json`.
+
+### Locally running the connector
+```
+python main.py spec
+python main.py check --config secrets/config.json
+python main.py discover --config secrets/config.json
+python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
+```
+
+### Locally running the connector docker image
+
+#### Build
+First, make sure you build the latest Docker image:
+```
+docker build . -t airbyte/source-sentry:dev
+```
+
+You can also build the connector image via Gradle:
+```
+./gradlew :airbyte-integrations:connectors:source-sentry:airbyteDocker
+```
+When building via Gradle, the docker image name and tag, respectively, are the values of the `io.airbyte.name` and `io.airbyte.version` `LABEL`s in
+the Dockerfile.
+
+#### Run
+Then run any of the connector commands as follows:
+```
+docker run --rm airbyte/source-sentry:dev spec
+docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-sentry:dev check --config /secrets/config.json
+docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-sentry:dev discover --config /secrets/config.json
+docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-sentry:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
+```
+## Testing
+Make sure to familiarize yourself with [pytest test discovery](https://docs.pytest.org/en/latest/goodpractices.html#test-discovery) to know how your test files and methods should be named.
+First install test dependencies into your virtual environment:
+```
+pip install .[tests]
+```
+### Unit Tests
+To run unit tests locally, from the connector directory run:
+```
+python -m pytest unit_tests
+```
+
+### Integration Tests
+There are two types of integration tests: Acceptance Tests (Airbyte's test suite for all source connectors) and custom integration tests (which are specific to this connector).
+#### Custom Integration tests
+Place custom tests inside `integration_tests/` folder, then, from the connector root, run
+```
+python -m pytest integration_tests
+```
+#### Acceptance Tests
+Customize `acceptance-test-config.yml` file to configure tests. See [Source Acceptance Tests](https://docs.airbyte.io/connector-development/testing-connectors/source-acceptance-tests-reference) for more information.
+If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py.
+To run your integration tests with acceptance tests, from the connector root, run
+```
+python -m pytest integration_tests -p integration_tests.acceptance
+```
+To run your integration tests with docker
+
+### Using gradle to run tests
+All commands should be run from airbyte project root.
+To run unit tests:
+```
+./gradlew :airbyte-integrations:connectors:source-sentry:unitTest
+```
+To run acceptance and custom integration tests:
+```
+./gradlew :airbyte-integrations:connectors:source-sentry:integrationTest
+```
+
+## Dependency Management
+All of your dependencies should go in `setup.py`, NOT `requirements.txt`. The requirements file is only used to connect internal Airbyte dependencies in the monorepo for local development.
+We split dependencies between two groups, dependencies that are:
+* required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
+* required for the testing need to go to `TEST_REQUIREMENTS` list
+
+### Publishing a new version of the connector
+You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
+1. Make sure your changes are passing unit and integration tests.
+1. Bump the connector version in `Dockerfile` -- just increment the value of the `LABEL io.airbyte.version` appropriately (we use [SemVer](https://semver.org/)).
+1. Create a Pull Request.
+1. Pat yourself on the back for being an awesome contributor.
+1. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
diff --git a/airbyte-integrations/connectors/source-sentry/acceptance-test-config.yml b/airbyte-integrations/connectors/source-sentry/acceptance-test-config.yml
new file mode 100644
index 0000000000000..a36b40014c1b2
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/acceptance-test-config.yml
@@ -0,0 +1,18 @@
+connector_image: airbyte/source-sentry:dev
+tests:
+ spec:
+ - spec_path: "source_sentry/spec.json"
+ connection:
+ - config_path: "secrets/config.json"
+ status: "succeed"
+ - config_path: "integration_tests/invalid_config.json"
+ status: "failed"
+ discovery:
+ - config_path: "secrets/config.json"
+ basic_read:
+ - config_path: "secrets/config.json"
+ configured_catalog_path: "integration_tests/configured_catalog.json"
+ empty_streams: []
+ full_refresh:
+ - config_path: "secrets/config.json"
+ configured_catalog_path: "integration_tests/configured_catalog.json"
diff --git a/airbyte-integrations/connectors/source-sentry/acceptance-test-docker.sh b/airbyte-integrations/connectors/source-sentry/acceptance-test-docker.sh
new file mode 100644
index 0000000000000..e4d8b1cef8961
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/acceptance-test-docker.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env sh
+
+# Build latest connector image
+docker build . -t $(cat acceptance-test-config.yml | grep "connector_image" | head -n 1 | cut -d: -f2)
+
+# Pull latest acctest image
+docker pull airbyte/source-acceptance-test:latest
+
+# Run
+docker run --rm -it \
+ -v /var/run/docker.sock:/var/run/docker.sock \
+ -v /tmp:/tmp \
+ -v $(pwd):/test_input \
+ airbyte/source-acceptance-test \
+ --acceptance-test-config /test_input
+
diff --git a/airbyte-integrations/connectors/source-sentry/bootstrap.md b/airbyte-integrations/connectors/source-sentry/bootstrap.md
new file mode 100644
index 0000000000000..7f1e939a53901
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/bootstrap.md
@@ -0,0 +1,16 @@
+## Streams
+
+Sentry is a REST API. Connector has the following streams, and all of them support full refresh only.
+
+* [Events](https://docs.sentry.io/api/events/list-a-projects-events/)
+* [Issues](https://docs.sentry.io/api/events/list-a-projects-issues/)
+
+And a [ProjectDetail](https://docs.sentry.io/api/projects/retrieve-a-project/) stream is also implemented just for connection checking.
+
+## Authentication
+
+Sentry API offers three types of [authentication methods](https://docs.sentry.io/api/auth/).
+
+* Auth Token - The most common authentication method in Sentry. Connector only supports this method.
+* DSN Authentication - Only some API endpoints support this method. Not supported by this connector.
+* API Keys - Keys are passed using HTTP Basic auth, and a legacy means of authenticating. They will still be supported but are disabled for new accounts. Not supported by this connector.
\ No newline at end of file
diff --git a/airbyte-integrations/connectors/source-sentry/build.gradle b/airbyte-integrations/connectors/source-sentry/build.gradle
new file mode 100644
index 0000000000000..ba18928d4c3b1
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/build.gradle
@@ -0,0 +1,14 @@
+plugins {
+ id 'airbyte-python'
+ id 'airbyte-docker'
+ id 'airbyte-source-acceptance-test'
+}
+
+airbytePython {
+ moduleDirectory 'source_sentry'
+}
+
+dependencies {
+ implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs)
+ implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
+}
diff --git a/airbyte-integrations/connectors/source-sentry/integration_tests/__init__.py b/airbyte-integrations/connectors/source-sentry/integration_tests/__init__.py
new file mode 100644
index 0000000000000..46b7376756ec6
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/integration_tests/__init__.py
@@ -0,0 +1,3 @@
+#
+# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
+#
diff --git a/airbyte-integrations/connectors/source-sentry/integration_tests/acceptance.py b/airbyte-integrations/connectors/source-sentry/integration_tests/acceptance.py
new file mode 100644
index 0000000000000..108075487440f
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/integration_tests/acceptance.py
@@ -0,0 +1,14 @@
+#
+# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
+#
+
+
+import pytest
+
+pytest_plugins = ("source_acceptance_test.plugin",)
+
+
+@pytest.fixture(scope="session", autouse=True)
+def connector_setup():
+ """ This fixture is a placeholder for external resources that acceptance test might require."""
+ yield
diff --git a/airbyte-integrations/connectors/source-sentry/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-sentry/integration_tests/configured_catalog.json
new file mode 100644
index 0000000000000..ed38985229c58
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/integration_tests/configured_catalog.json
@@ -0,0 +1,40 @@
+{
+ "streams": [
+ {
+ "sync_mode": "full_refresh",
+ "destination_sync_mode": "overwrite",
+ "stream": {
+ "name": "events",
+ "json_schema": {},
+ "supported_sync_modes": ["full_refresh"]
+ }
+ },
+ {
+ "sync_mode": "full_refresh",
+ "destination_sync_mode": "overwrite",
+ "stream": {
+ "name": "issues",
+ "json_schema": {},
+ "supported_sync_modes": ["full_refresh"]
+ }
+ },
+ {
+ "sync_mode": "full_refresh",
+ "destination_sync_mode": "overwrite",
+ "stream": {
+ "name": "project_detail",
+ "json_schema": {},
+ "supported_sync_modes": ["full_refresh"]
+ }
+ },
+ {
+ "sync_mode": "full_refresh",
+ "destination_sync_mode": "overwrite",
+ "stream": {
+ "name": "projects",
+ "json_schema": {},
+ "supported_sync_modes": ["full_refresh"]
+ }
+ }
+ ]
+}
diff --git a/airbyte-integrations/connectors/source-sentry/integration_tests/invalid_config.json b/airbyte-integrations/connectors/source-sentry/integration_tests/invalid_config.json
new file mode 100644
index 0000000000000..7a94e39068564
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/integration_tests/invalid_config.json
@@ -0,0 +1,6 @@
+{
+ "auth_token": "invalid-token",
+ "hostname": "sentry.io",
+ "organization": "invalid-organization",
+ "project": "invalid-project"
+}
diff --git a/airbyte-integrations/connectors/source-sentry/integration_tests/sample_config.json b/airbyte-integrations/connectors/source-sentry/integration_tests/sample_config.json
new file mode 100644
index 0000000000000..f0e080f4be8f2
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/integration_tests/sample_config.json
@@ -0,0 +1,6 @@
+{
+ "auth_token": "token",
+ "hostname": "sentry.io",
+ "organization": "organization",
+ "project": "project"
+}
diff --git a/airbyte-integrations/connectors/source-sentry/main.py b/airbyte-integrations/connectors/source-sentry/main.py
new file mode 100644
index 0000000000000..0bfb3a278aab4
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/main.py
@@ -0,0 +1,13 @@
+#
+# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
+#
+
+
+import sys
+
+from airbyte_cdk.entrypoint import launch
+from source_sentry import SourceSentry
+
+if __name__ == "__main__":
+ source = SourceSentry()
+ launch(source, sys.argv[1:])
diff --git a/airbyte-integrations/connectors/source-sentry/requirements.txt b/airbyte-integrations/connectors/source-sentry/requirements.txt
new file mode 100644
index 0000000000000..0411042aa0911
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/requirements.txt
@@ -0,0 +1,2 @@
+-e ../../bases/source-acceptance-test
+-e .
diff --git a/airbyte-integrations/connectors/source-sentry/setup.py b/airbyte-integrations/connectors/source-sentry/setup.py
new file mode 100644
index 0000000000000..ddf6245c4d992
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/setup.py
@@ -0,0 +1,29 @@
+#
+# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
+#
+
+
+from setuptools import find_packages, setup
+
+MAIN_REQUIREMENTS = [
+ "airbyte-cdk",
+]
+
+TEST_REQUIREMENTS = [
+ "pytest~=6.1",
+ "pytest-mock~=3.6.1",
+ "source-acceptance-test",
+]
+
+setup(
+ name="source_sentry",
+ description="Source implementation for Sentry.",
+ author="Airbyte",
+ author_email="contact@airbyte.io",
+ packages=find_packages(),
+ install_requires=MAIN_REQUIREMENTS,
+ package_data={"": ["*.json", "schemas/*.json", "schemas/shared/*.json"]},
+ extras_require={
+ "tests": TEST_REQUIREMENTS,
+ },
+)
diff --git a/airbyte-integrations/connectors/source-sentry/source_sentry/__init__.py b/airbyte-integrations/connectors/source-sentry/source_sentry/__init__.py
new file mode 100644
index 0000000000000..3435dba8e0726
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/source_sentry/__init__.py
@@ -0,0 +1,8 @@
+#
+# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
+#
+
+
+from .source import SourceSentry
+
+__all__ = ["SourceSentry"]
diff --git a/airbyte-integrations/connectors/source-sentry/source_sentry/schemas/events.json b/airbyte-integrations/connectors/source-sentry/source_sentry/schemas/events.json
new file mode 100644
index 0000000000000..59345c95f7d4e
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/source_sentry/schemas/events.json
@@ -0,0 +1,72 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "type": "object",
+ "properties": {
+ "eventID": {
+ "type": "string"
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "string"
+ },
+ "key": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "dateCreated": {
+ "type": "string"
+ },
+ "user": {
+ "type": ["null", "object"],
+ "properties": {
+ "username": {
+ "type": ["null", "string"]
+ },
+ "name": {
+ "type": ["null", "string"]
+ },
+ "ip_address": {
+ "type": ["null", "string"]
+ },
+ "email": {
+ "type": ["null", "string"]
+ },
+ "data": {
+ "type": ["null", "object"],
+ "properties": {
+ "isStaff": {
+ "type": "boolean"
+ }
+ }
+ },
+ "id": {
+ "type": "string"
+ }
+ }
+ },
+ "message": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "platform": {
+ "type": "string"
+ },
+ "event.type": {
+ "type": "string"
+ },
+ "groupID": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ }
+ }
+}
diff --git a/airbyte-integrations/connectors/source-sentry/source_sentry/schemas/issues.json b/airbyte-integrations/connectors/source-sentry/source_sentry/schemas/issues.json
new file mode 100644
index 0000000000000..d4814ea21498b
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/source_sentry/schemas/issues.json
@@ -0,0 +1,133 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "type": "object",
+ "properties": {
+ "annotations": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "assignedTo": {
+ "type": ["null", "object"]
+ },
+ "count": {
+ "type": "string"
+ },
+ "culprit": {
+ "type": "string"
+ },
+ "firstSeen": {
+ "type": "string"
+ },
+ "hasSeen": {
+ "type": "boolean"
+ },
+ "id": {
+ "type": "string"
+ },
+ "isBookmarked": {
+ "type": "boolean"
+ },
+ "isPublic": {
+ "type": "boolean"
+ },
+ "isSubscribed": {
+ "type": "boolean"
+ },
+ "lastSeen": {
+ "type": "string"
+ },
+ "level": {
+ "type": "string"
+ },
+ "logger": {
+ "type": ["null", "string"]
+ },
+ "metadata": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string"
+ }
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "filename": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ }
+ }
+ }
+ ]
+ },
+ "numComments": {
+ "type": "integer"
+ },
+ "permalink": {
+ "type": "string"
+ },
+ "project": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ }
+ }
+ },
+ "shareId": {
+ "type": ["null", "string"]
+ },
+ "shortId": {
+ "type": "string"
+ },
+ "stats": {
+ "type": "object",
+ "properties": {
+ "24h": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "number"
+ }
+ }
+ }
+ }
+ },
+ "status": {
+ "type": "string",
+ "enum": ["resolved", "unresolved", "ignored"]
+ },
+ "statusDetails": {
+ "type": "object"
+ },
+ "subscriptionDetails": {
+ "type": ["null", "object"]
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "userCount": {
+ "type": "integer"
+ }
+ }
+}
diff --git a/airbyte-integrations/connectors/source-sentry/source_sentry/schemas/project_detail.json b/airbyte-integrations/connectors/source-sentry/source_sentry/schemas/project_detail.json
new file mode 100644
index 0000000000000..efb12e70ffbc8
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/source_sentry/schemas/project_detail.json
@@ -0,0 +1,402 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "type": "object",
+ "properties": {
+ "allowedDomains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "avatar": {
+ "type": "object",
+ "properties": {
+ "avatarType": {
+ "type": "string"
+ },
+ "avatarUuid": {
+ "type": ["null", "string"]
+ }
+ }
+ },
+ "color": {
+ "type": "string"
+ },
+ "dataScrubber": {
+ "type": "boolean"
+ },
+ "dataScrubberDefaults": {
+ "type": "boolean"
+ },
+ "dateCreated": {
+ "type": "string"
+ },
+ "defaultEnvironment": {
+ "type": ["null", "string"]
+ },
+ "digestsMaxDelay": {
+ "type": "integer"
+ },
+ "digestsMinDelay": {
+ "type": "integer"
+ },
+ "features": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "firstEvent": {
+ "type": ["null", "string"]
+ },
+ "hasAccess": {
+ "type": "boolean"
+ },
+ "id": {
+ "type": "string"
+ },
+ "isBookmarked": {
+ "type": "boolean"
+ },
+ "isInternal": {
+ "type": "boolean"
+ },
+ "isMember": {
+ "type": "boolean"
+ },
+ "isPublic": {
+ "type": "boolean"
+ },
+ "latestRelease": {
+ "type": ["null", "object"],
+ "properties": {
+ "authors": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "commitCount": {
+ "type": "integer"
+ },
+ "data": {
+ "type": "object"
+ },
+ "dateCreated": {
+ "type": "string"
+ },
+ "dateReleased": {
+ "type": ["null", "string"]
+ },
+ "deployCount": {
+ "type": "integer"
+ },
+ "firstEvent": {
+ "type": ["null", "string"]
+ },
+ "lastCommit": {
+ "type": ["null", "object"]
+ },
+ "lastDeploy": {
+ "type": ["null", "object"]
+ },
+ "lastEvent": {
+ "type": ["null", "string"]
+ },
+ "newGroups": {
+ "type": "integer"
+ },
+ "owner": {
+ "type": ["null", "string"]
+ },
+ "projects": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "ref": {
+ "type": ["null", "string"]
+ },
+ "shortVersion": {
+ "type": "string"
+ },
+ "url": {
+ "type": ["null", "string"]
+ },
+ "version": {
+ "type": "string"
+ }
+ }
+ },
+ "name": {
+ "type": "string"
+ },
+ "options": {
+ "type": "object",
+ "properties": {
+ "feedback:branding": {
+ "type": "boolean"
+ },
+ "filters:blacklisted_ips": {
+ "type": "string"
+ },
+ "filters:error_messages": {
+ "type": "string"
+ },
+ "filters:releases": {
+ "type": "string"
+ },
+ "sentry:csp_ignored_sources": {
+ "type": "string"
+ },
+ "sentry:csp_ignored_sources_defaults": {
+ "type": "boolean"
+ },
+ "sentry:reprocessing_active": {
+ "type": "boolean"
+ }
+ }
+ },
+ "organization": {
+ "type": "object",
+ "properties": {
+ "avatar": {
+ "type": "object",
+ "properties": {
+ "avatarType": {
+ "type": "string"
+ },
+ "avatarUuid": {
+ "type": ["null", "string"]
+ }
+ }
+ },
+ "dateCreated": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "id": {
+ "type": "string"
+ },
+ "isEarlyAdopter": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "require2FA": {
+ "type": "boolean"
+ },
+ "slug": {
+ "type": "string"
+ },
+ "status": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "platform": {
+ "type": ["null", "string"]
+ },
+ "platforms": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "plugins": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "assets": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "author": {
+ "type": ["null", "object"],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ }
+ }
+ },
+ "canDisable": {
+ "type": "boolean"
+ },
+ "contexts": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "description": {
+ "type": "string"
+ },
+ "doc": {
+ "type": "string"
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "hasConfiguration": {
+ "type": "boolean"
+ },
+ "id": {
+ "type": "string"
+ },
+ "isTestable": {
+ "type": "boolean"
+ },
+ "metadata": {
+ "type": "object"
+ },
+ "name": {
+ "type": "string"
+ },
+ "resourceLinks": {
+ "type": ["null", "array"],
+ "items": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "shortName": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "version": {
+ "type": ["null", "string"]
+ }
+ }
+ }
+ },
+ "processingIssues": {
+ "type": "integer"
+ },
+ "relayPiiConfig": {
+ "type": ["null", "string"]
+ },
+ "resolveAge": {
+ "type": "integer"
+ },
+ "safeFields": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "scrapeJavaScript": {
+ "type": "boolean"
+ },
+ "scrubIPAddresses": {
+ "type": "boolean"
+ },
+ "securityToken": {
+ "type": "string"
+ },
+ "securityTokenHeader": {
+ "type": ["null", "string"]
+ },
+ "sensitiveFields": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "slug": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ },
+ "storeCrashReports": {
+ "type": ["null", "boolean"]
+ },
+ "subjectPrefix": {
+ "type": "string"
+ },
+ "subjectTemplate": {
+ "type": "string"
+ },
+ "team": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ }
+ }
+ },
+ "teams": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "verifySSL": {
+ "type": "boolean"
+ }
+ }
+}
diff --git a/airbyte-integrations/connectors/source-sentry/source_sentry/schemas/projects.json b/airbyte-integrations/connectors/source-sentry/source_sentry/schemas/projects.json
new file mode 100644
index 0000000000000..3656b0b27c2a9
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/source_sentry/schemas/projects.json
@@ -0,0 +1,119 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "type": "object",
+ "properties": {
+ "avatar": {
+ "type": "object",
+ "properties": {
+ "avatarType": {
+ "type": "string"
+ },
+ "avatarUuid": {
+ "type": ["null", "string"]
+ }
+ }
+ },
+ "color": {
+ "type": "string"
+ },
+ "dateCreated": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "features": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "firstEvent": {
+ "type": ["null", "string"]
+ },
+ "hasAccess": {
+ "type": "boolean"
+ },
+ "id": {
+ "type": "string"
+ },
+ "isBookmarked": {
+ "type": "boolean"
+ },
+ "isInternal": {
+ "type": "boolean"
+ },
+ "isMember": {
+ "type": "boolean"
+ },
+ "isPublic": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "organization": {
+ "type": "object",
+ "properties": {
+ "avatar": {
+ "type": "object",
+ "properties": {
+ "avatarType": {
+ "type": "string"
+ },
+ "avatarUuid": {
+ "type": ["null", "string"]
+ }
+ }
+ },
+ "dateCreated": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "id": {
+ "type": "string"
+ },
+ "isEarlyAdopter": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "require2FA": {
+ "type": "boolean"
+ },
+ "slug": {
+ "type": "string"
+ },
+ "status": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ },
+ "requireEmailVerification": {
+ "type": "boolean"
+ },
+ "features": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "platform": {
+ "type": ["null", "string"]
+ },
+ "slug": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string",
+ "enum": ["active", "disabled", "pending_deletion", "deletion_in_progress"]
+ }
+ }
+}
diff --git a/airbyte-integrations/connectors/source-sentry/source_sentry/source.py b/airbyte-integrations/connectors/source-sentry/source_sentry/source.py
new file mode 100644
index 0000000000000..9eb192da02627
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/source_sentry/source.py
@@ -0,0 +1,44 @@
+#
+# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
+#
+
+
+from typing import Any, List, Mapping, Tuple
+
+from airbyte_cdk.models import SyncMode
+from airbyte_cdk.sources import AbstractSource
+from airbyte_cdk.sources.streams import Stream
+from airbyte_cdk.sources.streams.http.auth import TokenAuthenticator
+
+from .streams import Events, Issues, ProjectDetail, Projects
+
+
+# Source
+class SourceSentry(AbstractSource):
+ def check_connection(self, logger, config) -> Tuple[bool, Any]:
+ try:
+ projects_stream = Projects(
+ authenticator=TokenAuthenticator(token=config["auth_token"]),
+ hostname=config.get("hostname"),
+ )
+ next(projects_stream.read_records(sync_mode=SyncMode.full_refresh))
+ return True, None
+ except Exception as e:
+ return False, e
+
+ def streams(self, config: Mapping[str, Any]) -> List[Stream]:
+ stream_args = {
+ "authenticator": TokenAuthenticator(token=config["auth_token"]),
+ "hostname": config.get("hostname"),
+ }
+ project_stream_args = {
+ **stream_args,
+ "organization": config["organization"],
+ "project": config["project"],
+ }
+ return [
+ Events(**project_stream_args),
+ Issues(**project_stream_args),
+ ProjectDetail(**project_stream_args),
+ Projects(**stream_args),
+ ]
diff --git a/airbyte-integrations/connectors/source-sentry/source_sentry/spec.json b/airbyte-integrations/connectors/source-sentry/source_sentry/spec.json
new file mode 100644
index 0000000000000..fbfb01e2fcf53
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/source_sentry/spec.json
@@ -0,0 +1,34 @@
+{
+ "documentationUrl": "https://docs.airbyte.io/integrations/sources/sentry",
+ "connectionSpecification": {
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "Sentry Spec",
+ "type": "object",
+ "required": ["auth_token", "organization", "project"],
+ "additionalProperties": false,
+ "properties": {
+ "auth_token": {
+ "type": "string",
+ "title": "Authentication tokens",
+ "description": "Log into Sentry and then create authentication tokens.For self-hosted, you can find or create authentication tokens by visiting \"{instance_url_prefix}/settings/account/api/auth-tokens/\"",
+ "airbyte_secret": true
+ },
+ "hostname": {
+ "type": "string",
+ "title": "Host Name",
+ "description": "Host name of Sentry API server.For self-hosted, specify your host name here. Otherwise, leave it empty.",
+ "default": "sentry.io"
+ },
+ "organization": {
+ "type": "string",
+ "title": "Organization",
+ "description": "The slug of the organization the groups belong to."
+ },
+ "project": {
+ "type": "string",
+ "title": "Project",
+ "description": "The slug of the project the groups belong to."
+ }
+ }
+ }
+}
diff --git a/airbyte-integrations/connectors/source-sentry/source_sentry/streams.py b/airbyte-integrations/connectors/source-sentry/source_sentry/streams.py
new file mode 100644
index 0000000000000..66ab436156f8a
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/source_sentry/streams.py
@@ -0,0 +1,158 @@
+#
+# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
+#
+
+
+from abc import ABC
+from typing import Any, Iterable, Mapping, MutableMapping, Optional
+
+import requests
+from airbyte_cdk.sources.streams.http import HttpStream
+
+
+class SentryStream(HttpStream, ABC):
+ API_VERSION = "0"
+ URL_TEMPLATE = "https://{hostname}/api/{api_version}/"
+ primary_key = "id"
+
+ def __init__(self, hostname: str, **kwargs):
+ super().__init__(**kwargs)
+ self._url_base = self.URL_TEMPLATE.format(hostname=hostname, api_version=self.API_VERSION)
+
+ @property
+ def url_base(self) -> str:
+ return self._url_base
+
+ def next_page_token(self, response: requests.Response) -> Optional[Mapping[str, Any]]:
+ return None
+
+ def request_params(
+ self,
+ stream_state: Mapping[str, Any],
+ stream_slice: Optional[Mapping[str, Any]] = None,
+ next_page_token: Optional[Mapping[str, Any]] = None,
+ ) -> MutableMapping[str, Any]:
+ return {}
+
+
+class SentryStreamPagination(SentryStream):
+ def next_page_token(self, response: requests.Response) -> Optional[Mapping[str, Any]]:
+ """
+ Expect the link header field to always contain the values for `rel`, `results`, and `cursor`.
+ If there is actually the next page, rel="next"; results="true"; cursor="".
+ """
+ if response.links["next"]["results"] == "true":
+ return {"cursor": response.links["next"]["cursor"]}
+ else:
+ return None
+
+ def request_params(
+ self,
+ stream_state: Mapping[str, Any],
+ stream_slice: Optional[Mapping[str, Any]] = None,
+ next_page_token: Optional[Mapping[str, Any]] = None,
+ ) -> MutableMapping[str, Any]:
+ params = super().request_params(stream_state, stream_slice, next_page_token)
+ if next_page_token:
+ params.update(next_page_token)
+
+ return params
+
+ def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapping]:
+ yield from response.json()
+
+
+class Events(SentryStreamPagination):
+ """
+ Docs: https://docs.sentry.io/api/events/list-a-projects-events/
+ """
+
+ def __init__(self, organization: str, project: str, **kwargs):
+ super().__init__(**kwargs)
+ self._organization = organization
+ self._project = project
+
+ def path(
+ self,
+ stream_state: Optional[Mapping[str, Any]] = None,
+ stream_slice: Optional[Mapping[str, Any]] = None,
+ next_page_token: Optional[Mapping[str, Any]] = None,
+ ) -> str:
+ return f"projects/{self._organization}/{self._project}/events/"
+
+ def request_params(
+ self,
+ stream_state: Mapping[str, Any],
+ stream_slice: Optional[Mapping[str, Any]] = None,
+ next_page_token: Optional[Mapping[str, Any]] = None,
+ ) -> MutableMapping[str, Any]:
+ params = super().request_params(stream_state, stream_slice, next_page_token)
+ params.update({"full": "true"})
+
+ return params
+
+
+class Issues(SentryStreamPagination):
+ """
+ Docs: https://docs.sentry.io/api/events/list-a-projects-issues/
+ """
+
+ def __init__(self, organization: str, project: str, **kwargs):
+ super().__init__(**kwargs)
+ self._organization = organization
+ self._project = project
+
+ def path(
+ self,
+ stream_state: Optional[Mapping[str, Any]] = None,
+ stream_slice: Optional[Mapping[str, Any]] = None,
+ next_page_token: Optional[Mapping[str, Any]] = None,
+ ) -> str:
+ return f"projects/{self._organization}/{self._project}/issues/"
+
+ def request_params(
+ self,
+ stream_state: Mapping[str, Any],
+ stream_slice: Optional[Mapping[str, Any]] = None,
+ next_page_token: Optional[Mapping[str, Any]] = None,
+ ) -> MutableMapping[str, Any]:
+ params = super().request_params(stream_state, stream_slice, next_page_token)
+ params.update({"statsPeriod": "", "query": ""})
+
+ return params
+
+
+class Projects(SentryStreamPagination):
+ """
+ Docs: https://docs.sentry.io/api/projects/list-your-projects/
+ """
+
+ def path(
+ self,
+ stream_state: Optional[Mapping[str, Any]] = None,
+ stream_slice: Optional[Mapping[str, Any]] = None,
+ next_page_token: Optional[Mapping[str, Any]] = None,
+ ) -> str:
+ return "projects/"
+
+
+class ProjectDetail(SentryStream):
+ """
+ Docs: https://docs.sentry.io/api/projects/retrieve-a-project/
+ """
+
+ def __init__(self, organization: str, project: str, **kwargs):
+ super().__init__(**kwargs)
+ self._organization = organization
+ self._project = project
+
+ def path(
+ self,
+ stream_state: Optional[Mapping[str, Any]] = None,
+ stream_slice: Optional[Mapping[str, Any]] = None,
+ next_page_token: Optional[Mapping[str, Any]] = None,
+ ) -> str:
+ return f"projects/{self._organization}/{self._project}/"
+
+ def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapping]:
+ yield response.json()
diff --git a/airbyte-integrations/connectors/source-sentry/unit_tests/__init__.py b/airbyte-integrations/connectors/source-sentry/unit_tests/__init__.py
new file mode 100644
index 0000000000000..46b7376756ec6
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/unit_tests/__init__.py
@@ -0,0 +1,3 @@
+#
+# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
+#
diff --git a/airbyte-integrations/connectors/source-sentry/unit_tests/test_source.py b/airbyte-integrations/connectors/source-sentry/unit_tests/test_source.py
new file mode 100644
index 0000000000000..03cc8a1144f24
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/unit_tests/test_source.py
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
+#
+
+from unittest.mock import MagicMock
+
+from source_sentry.source import SourceSentry
+from source_sentry.streams import Projects
+
+
+def test_check_connection(mocker):
+ source = SourceSentry()
+ logger_mock, config_mock = MagicMock(), MagicMock()
+ mocker.patch.object(Projects, "read_records", return_value=iter([{"id": "1", "name": "test"}]))
+ assert source.check_connection(logger_mock, config_mock) == (True, None)
+
+
+def test_streams(mocker):
+ source = SourceSentry()
+ config_mock = MagicMock()
+ config_mock["auth_token"] = "test-token"
+ config_mock["organization"] = "test-organization"
+ config_mock["project"] = "test-project"
+ streams = source.streams(config_mock)
+ expected_streams_number = 4
+ assert len(streams) == expected_streams_number
diff --git a/airbyte-integrations/connectors/source-sentry/unit_tests/test_streams.py b/airbyte-integrations/connectors/source-sentry/unit_tests/test_streams.py
new file mode 100644
index 0000000000000..2417953ac0400
--- /dev/null
+++ b/airbyte-integrations/connectors/source-sentry/unit_tests/test_streams.py
@@ -0,0 +1,110 @@
+#
+# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
+#
+
+from unittest.mock import MagicMock
+
+import pytest
+from source_sentry.streams import Events, Issues, ProjectDetail, Projects, SentryStreamPagination
+
+INIT_ARGS = {"hostname": "sentry.io", "organization": "test-org", "project": "test-project"}
+
+
+@pytest.fixture
+def patch_base_class(mocker):
+ # Mock abstract methods to enable instantiating abstract class
+ mocker.patch.object(SentryStreamPagination, "path", "test_endpoint")
+ mocker.patch.object(SentryStreamPagination, "__abstractmethods__", set())
+
+
+def test_next_page_token(patch_base_class):
+ stream = SentryStreamPagination(hostname="sentry.io")
+ resp = MagicMock()
+ cursor = "next_page_num"
+ resp.links = {"next": {"results": "true", "cursor": cursor}}
+ inputs = {"response": resp}
+ expected_token = {"cursor": cursor}
+ assert stream.next_page_token(**inputs) == expected_token
+
+
+def test_next_page_token_is_none(patch_base_class):
+ stream = SentryStreamPagination(hostname="sentry.io")
+ resp = MagicMock()
+ resp.links = {"next": {"results": "false", "cursor": "no_next"}}
+ inputs = {"response": resp}
+ expected_token = None
+ assert stream.next_page_token(**inputs) == expected_token
+
+
+def next_page_token_inputs():
+ links_headers = [
+ {},
+ {"next": {}},
+ ]
+ responses = [MagicMock() for _ in links_headers]
+ for mock, header in zip(responses, links_headers):
+ mock.links = header
+
+ return responses
+
+
+@pytest.mark.parametrize("response", next_page_token_inputs())
+def test_next_page_token_raises(patch_base_class, response):
+ stream = SentryStreamPagination(hostname="sentry.io")
+ inputs = {"response": response}
+ with pytest.raises(KeyError):
+ stream.next_page_token(**inputs)
+
+
+def test_events_path():
+ stream = Events(**INIT_ARGS)
+ expected = "projects/test-org/test-project/events/"
+ assert stream.path() == expected
+
+
+def test_issues_path():
+ stream = Issues(**INIT_ARGS)
+ expected = "projects/test-org/test-project/issues/"
+ assert stream.path() == expected
+
+
+def test_projects_path():
+ stream = Projects(hostname="sentry.io")
+ expected = "projects/"
+ assert stream.path() == expected
+
+
+def test_project_detail_path():
+ stream = ProjectDetail(**INIT_ARGS)
+ expected = "projects/test-org/test-project/"
+ assert stream.path() == expected
+
+
+def test_sentry_stream_pagination_request_params(patch_base_class):
+ stream = SentryStreamPagination(hostname="sentry.io")
+ expected = {"cursor": "next-page"}
+ assert stream.request_params(stream_state=None, next_page_token={"cursor": "next-page"}) == expected
+
+
+def test_events_request_params():
+ stream = Events(**INIT_ARGS)
+ expected = {"cursor": "next-page", "full": "true"}
+ assert stream.request_params(stream_state=None, next_page_token={"cursor": "next-page"}) == expected
+
+
+def test_issues_request_params():
+ stream = Issues(**INIT_ARGS)
+ expected = {"cursor": "next-page", "statsPeriod": "", "query": ""}
+ assert stream.request_params(stream_state=None, next_page_token={"cursor": "next-page"}) == expected
+
+
+def test_projects_request_params():
+ stream = Projects(hostname="sentry.io")
+ expected = {"cursor": "next-page"}
+ assert stream.request_params(stream_state=None, next_page_token={"cursor": "next-page"}) == expected
+
+
+def test_project_detail_request_params():
+ stream = ProjectDetail(**INIT_ARGS)
+ expected = {}
+ assert stream.request_params(stream_state=None, next_page_token=None) == expected
diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md
index f66c0bb837f4d..dbe507aa841cd 100644
--- a/docs/SUMMARY.md
+++ b/docs/SUMMARY.md
@@ -111,6 +111,7 @@
* [Salesforce](integrations/sources/salesforce.md)
* [SalesLoft](integrations/sources/salesloft.md)
* [Sendgrid](integrations/sources/sendgrid.md)
+ * [Sentry](integrations/sources/sentry.md)
* [Shopify](integrations/sources/shopify.md)
* [Shortio](integrations/sources/shortio.md)
* [Slack](integrations/sources/slack.md)
diff --git a/docs/integrations/README.md b/docs/integrations/README.md
index 797b6fa5f144d..a916ec6ffd7e2 100644
--- a/docs/integrations/README.md
+++ b/docs/integrations/README.md
@@ -95,6 +95,7 @@ Airbyte uses a grading system for connectors to help users understand what to ex
| [Salesloft](./sources/salesloft.md)| Alpha |
| [SAP Business One](sources/sap-business-one.md) | Beta |
| [Sendgrid](sources/sendgrid.md) | Certified |
+| [Sentry](sources/sentry.md) | Alpha |
| [Shopify](sources/shopify.md) | Certified |
| [Short.io](sources/shortio.md) | Beta |
| [Slack](sources/slack.md) | Beta |
diff --git a/docs/integrations/sources/sentry.md b/docs/integrations/sources/sentry.md
new file mode 100644
index 0000000000000..d0e07ac29af21
--- /dev/null
+++ b/docs/integrations/sources/sentry.md
@@ -0,0 +1,49 @@
+# Sentry
+
+## Sync overview
+
+This source can sync data for the [Sentry API](https://docs.sentry.io/api/). It supports only Full Refresh syncs.
+
+### Output schema
+
+This Source is capable of syncing the following Streams:
+
+* [Events](https://docs.sentry.io/api/events/list-a-projects-events/)
+* [Issues](https://docs.sentry.io/api/events/list-a-projects-issues/)
+
+### Data type mapping
+
+| Integration Type | Airbyte Type | Notes |
+| :--- | :--- | :--- |
+| `string` | `string` | |
+| `integer`, `number` | `number` | |
+| `array` | `array` | |
+| `object` | `object` | |
+
+### Features
+
+| Feature | Supported?\(Yes/No\) | Notes |
+| :--- | :--- | :--- |
+| Full Refresh Sync | Yes | |
+| Incremental Sync | No | |
+| SSL connection | Yes |
+| Namespaces | No | |
+
+## Getting started
+
+### Requirements
+
+* `auth_token` - Sentry Authentication Token with the necessary permissions \(described below\)
+* `organization` - Organization Slug. You can check it at https://sentry.io/settings//
+* `project` - The name of the Project you wanto sync. You can list it from https://sentry.io/settings//projects/
+* `hostname` - Host name of Sentry API server. For self-hosted, specify your host name here. Otherwise, leave it empty. \(default: sentry.io\)
+
+### Setup guide
+
+You can find or create authentication tokens within [Sentry](https://sentry.io/settings/account/api/auth-tokens/).
+
+## Changelog
+
+| Version | Date | Pull Request | Subject |
+| :--- | :--- | :--- | :--- |
+| 0.1.0 | 2021-10-12 | [6975](https://github.com/airbytehq/airbyte/pull/6975) | New Source: Sentry |