Create Sentry Project

Action ID: sentry:project:create
NPM Package:

@backstage/plugin-scaffolder-backend-module-sentry

Description

Creates a new Sentry project for a specified organization and team with optional parameters.

Input Schema

PropertyTypeDescriptionRequired
namestringThe name for the new project
slugstringOptional slug for the new project. If not provided a slug is generated from the name
platformstringOptional sentry platform for the new project.
teamSlugstringThe slug of the team to create a new project for
authTokenstringauthenticate via bearer auth token. Requires scope: project:write
organizationSlugstringThe slug of the organization the team belongs to

Output Schema

No output schema defined for this action.

Usage Examples

Create a Sentry project with required fields

Creates a project for the given organization and team using the service name. Run this after fetch:template to provision Sentry alongside your new service.

Copy
steps:
  - id: fetchBase
    action: fetch:template
    input:
      url: ./skeleton
      values:
        name: ${{ parameters.serviceName }}

  - id: createSentryProject
    action: sentry:project:create
    input:
      organizationSlug: acme-inc
      teamSlug: platform-eng
      name: ${{ parameters.serviceName }}
      authToken: ${{ parameters.sentryAuthToken }}

Create a Django project with a custom slug

Creates a Django project with a stable slug that matches your repository naming. Use when you need the Sentry project slug to be predictable. Run after fetch:template.

Copy
steps:
  - id: fetchBase
    action: fetch:template
    input:
      url: ./python-django-template
      values:
        serviceName: ${{ parameters.serviceName }}
        repoSlug: ${{ parameters.repoSlug }}

  - id: createSentryProject
    action: sentry:project:create
    input:
      organizationSlug: acme-inc
      teamSlug: payments
      name: ${{ parameters.serviceName }}
      slug: ${{ parameters.repoSlug }}
      platform: python-django
      authToken: ${{ parameters.sentryAuthToken }}

Conditionally create a project based on a template parameter

Creates the project only if the user opts in. Use this to make Sentry optional in your template. Place after fetch:template.

Copy
steps:
  - id: fetchBase
    action: fetch:template
    input:
      url: ./service-template
      values:
        componentId: ${{ parameters.componentId }}

  - id: createSentryProject
    if: ${{ parameters.enableSentry }}
    action: sentry:project:create
    input:
      organizationSlug: ${{ parameters.orgSlug }}
      teamSlug: ${{ parameters.teamSlug }}
      name: ${{ parameters.componentId }}
      platform: ${{ parameters.sentryPlatform }}
      authToken: ${{ parameters.sentryAuthToken }}

Create environment-specific projects with a computed slug

Creates a project per environment and computes the slug to include the environment name. Use for staging or preview environments. Run after fetch:template.

Copy
steps:
  - id: fetchBase
    action: fetch:template
    input:
      url: ./java-service-template
      values:
        componentId: ${{ parameters.componentId }}
        environment: ${{ parameters.environment }}

  - id: createSentryProject
    action: sentry:project:create
    input:
      organizationSlug: acme-inc
      teamSlug: observability
      name: ${{ parameters.componentId }} - ${{ parameters.environment | upper }}
      slug: ${{ parameters.componentId }}-${{ parameters.environment }}
      platform: java-spring
      authToken: ${{ parameters.sentryAuthToken }}

Create a React Native project for the mobile team

Creates a project for a mobile app owned by the mobile team with the React Native platform. Run after fetch:template.

Copy
steps:
  - id: fetchBase
    action: fetch:template
    input:
      url: ./mobile-app-template
      values:
        appName: ${{ parameters.appName }}
        platformTarget: ios

  - id: createSentryProject
    action: sentry:project:create
    input:
      organizationSlug: acme-inc
      teamSlug: mobile
      name: ${{ parameters.appName }} iOS
      slug: ${{ parameters.appName | lower }}-ios
      platform: react-native
      authToken: ${{ parameters.sentryAuthToken }}