Preprod Artifacts

Preprod artifact webhooks notify your integration when mobile build size analysis or build distribution processing completes.

When you subscribe to preprod artifact webhooks, your integration receives notifications when mobile build processing completes. Use these to track size analysis results and build distribution status for your mobile artifacts.

To enable preprod artifact webhooks:

  1. Navigate to Settings > Developer Settings > New Internal Integration
  2. Fill out required Integration Details
  3. Enable project:read permission or higher
  4. Select preprod_artifact for webhook type

'Sentry-Hook-Resource': 'preprod_artifact'

Preprod artifact webhooks support two event types:

  • preprod_artifact.size_analysis_completed - Triggered when size analysis completes or fails
  • preprod_artifact.build_distribution_completed - Triggered when build distribution processing completes or fails

All preprod artifact webhooks share these common attributes:

  • type: string
  • description: The specific event that occurred (size_analysis_completed or build_distribution_completed)

  • type: string
  • description: Unique identifier for the build artifact

  • type: string
  • description: The slug of the organization that owns the build

  • type: string
  • description: The slug of the project that owns the build

  • type: string (nullable)
  • description: The target platform (for example, APPLE, ANDROID)

  • type: string
  • description: The processing result, either COMPLETED or FAILED

  • type: object
  • description: Metadata about the application
FieldTypeDescription
appIdstring (nullable)Application bundle identifier
namestring (nullable)Application name
versionstring (nullable)Application version string
buildNumberinteger (nullable)Build number
artifactTypestring (nullable)Type of artifact (for example, XCARCHIVE, AAB, IPA, APK)
dateAddedstring (nullable)ISO 8601 timestamp when the artifact was uploaded
dateBuiltstring (nullable)ISO 8601 timestamp when the artifact was built

  • type: object (nullable)
  • description: Git repository and branch metadata. Present when the build is associated with a source code repository.
FieldTypeDescription
headShastring (nullable)Commit SHA of the head branch
baseShastring (nullable)Commit SHA of the base branch
providerstring (nullable)Source code provider (for example, github)
headRepoNamestring (nullable)Full repository name of the head branch
baseRepoNamestring (nullable)Full repository name of the base branch
headRefstring (nullable)Head branch name
baseRefstring (nullable)Base branch name
prNumberinteger (nullable)Associated pull request number

  • type: string (nullable)
  • description: Error code if processing failed. Possible values depend on the webhook type:

Size analysis error codes:

  • PROCESSING_ERROR - Analysis processing failed
  • TIMEOUT - Analysis timed out
  • UNSUPPORTED_ARTIFACT - The artifact type is not supported for size analysis
  • NO_QUOTA - Organization has no remaining analysis quota

Build distribution error codes:

  • PROCESSING_ERROR - Distribution processing failed
  • NO_QUOTA - Organization has no remaining distribution quota
  • SKIPPED - Distribution processing was skipped
  • UNKNOWN - An unknown error occurred

  • type: string (nullable)
  • description: Detailed error message if processing failed

Fires when a mobile build's size analysis finishes processing. The payload is a subset of the Size Analysis API response.

In addition to the common attributes above, this webhook includes the following fields:

  • type: integer (nullable)
  • description: Download size in bytes

  • type: integer (nullable)
  • description: Install size in bytes

  • type: number (nullable)
  • description: Time taken to complete analysis in seconds

  • type: string (nullable)
  • description: Version identifier for the analysis engine

  • type: string (nullable)
  • description: Build ID of the base artifact used for comparison

  • type: object (nullable)
  • description: App metadata for the base artifact (same shape as appInfo)

  • type: array (nullable)
  • description: Size comparison results for each component of the build (for example, main artifact, watch app, app clip)
FieldTypeDescription
metricsArtifactTypestringComponent type (for example, MAIN_ARTIFACT, WATCH_ARTIFACT, APP_CLIP_ARTIFACT)
identifierstring (nullable)Bundle identifier of the component
statestringComparison state (SUCCESS or FAILED)
errorCodestring (nullable)Error code if the comparison failed (see below)
errorMessagestring (nullable)Error message if the comparison failed
sizeMetricDiffobject (nullable)Size difference metrics

Possible comparison error codes:

  • NO_BASE_METRIC - No matching base artifact size metric found for this component
  • TIMEOUT - The size comparison timed out
  • FILE_ERROR - The comparison result file is missing or could not be found
  • PARSE_ERROR - Failed to parse the comparison result data
  • UNKNOWN - An unknown error occurred

The sizeMetricDiff object contains:

FieldTypeDescription
metricsArtifactTypestringComponent type
identifierstring (nullable)Bundle identifier
headInstallSizeintegerInstall size of the head build in bytes
headDownloadSizeintegerDownload size of the head build in bytes
baseInstallSizeintegerInstall size of the base build in bytes
baseDownloadSizeintegerDownload size of the base build in bytes

Copied
{
  "action": "size_analysis_completed",
  "installation": {
    "uuid": "77081c59-d802-40b8-b635-2e6f792f74de"
  },
  "data": {
    "buildId": "72",
    "organizationSlug": "my-org",
    "projectSlug": "my-project",
    "platform": "APPLE",
    "state": "COMPLETED",
    "appInfo": {
      "appId": "com.example.myapp",
      "name": "MyApp",
      "version": "1.0",
      "buildNumber": 2,
      "artifactType": "XCARCHIVE",
      "dateAdded": "2025-03-19T12:39:44.699049+00:00",
      "dateBuilt": "2025-03-19T12:39:26+00:00"
    },
    "gitInfo": {
      "headSha": "16bee14a5a68d4bb89c48735264b384223754fae",
      "baseSha": "88d7247b737f798e7ae4cfdea96e5c64b8718e8d",
      "provider": "github",
      "headRepoName": "my-org/my-app",
      "baseRepoName": "my-org/my-app",
      "headRef": "feature-branch",
      "baseRef": "main",
      "prNumber": 3
    },
    "errorCode": null,
    "errorMessage": null,
    "downloadSize": 28864215,
    "installSize": 30806016,
    "analysisDuration": 21.64,
    "analysisVersion": "1.2.1",
    "baseBuildId": "57",
    "baseAppInfo": {
      "appId": "com.example.myapp",
      "name": "MyApp",
      "version": "1.0",
      "buildNumber": 2,
      "artifactType": "XCARCHIVE",
      "dateAdded": "2025-03-09T16:55:39.111991+00:00",
      "dateBuilt": "2025-03-09T16:55:26+00:00"
    },
    "comparisons": [
      {
        "metricsArtifactType": "MAIN_ARTIFACT",
        "identifier": null,
        "state": "SUCCESS",
        "errorCode": null,
        "errorMessage": null,
        "sizeMetricDiff": {
          "metricsArtifactType": "MAIN_ARTIFACT",
          "identifier": null,
          "headInstallSize": 17833984,
          "headDownloadSize": 16255246,
          "baseInstallSize": 5394432,
          "baseDownloadSize": 3844031
        }
      },
      {
        "metricsArtifactType": "WATCH_ARTIFACT",
        "identifier": "com.example.myapp.watchkitapp",
        "state": "SUCCESS",
        "errorCode": null,
        "errorMessage": null,
        "sizeMetricDiff": {
          "metricsArtifactType": "WATCH_ARTIFACT",
          "identifier": "com.example.myapp.watchkitapp",
          "headInstallSize": 9023488,
          "headDownloadSize": 8765015,
          "baseInstallSize": 290816,
          "baseDownloadSize": 51594
        }
      }
    ]
  },
  "actor": {
    "type": "application",
    "id": "sentry",
    "name": "Sentry"
  }
}

Fires when a build distribution (installable artifact) finishes processing. The payload is a subset of the Install Info API response.

In addition to the common attributes above, this webhook includes the following fields:

  • type: string
  • description: The Sentry project ID

  • type: string (nullable)
  • description: Build configuration type (for example, release)

  • type: boolean
  • description: Whether the artifact can be installed on a device

  • type: string (nullable)
  • description: URL for downloading and installing the artifact

  • type: boolean (nullable)
  • description: Whether the code signature is valid (Apple platforms)

  • type: string (nullable)
  • description: Provisioning profile name (Apple platforms)

  • type: string (nullable)
  • description: Code signing type (Apple platforms)

Copied
{
  "action": "build_distribution_completed",
  "installation": {
    "uuid": "77081c59-d802-40b8-b635-2e6f792f74de"
  },
  "data": {
    "buildId": "95",
    "organizationSlug": "my-org",
    "projectId": "1",
    "projectSlug": "my-project",
    "platform": "ANDROID",
    "state": "COMPLETED",
    "appInfo": {
      "appId": "com.example.myapp",
      "name": "MyApp",
      "version": "1.0",
      "buildNumber": 1,
      "artifactType": "AAB",
      "dateAdded": "2025-03-24T15:08:57.364465+00:00",
      "dateBuilt": null
    },
    "gitInfo": {
      "headSha": "aa64c3dde25a54852dabc77e2cc3239335834aa5",
      "baseSha": "88d7247b737f798e7ae4cfdea96e5c64b8718e8d",
      "provider": "github",
      "headRepoName": "my-org/my-app",
      "baseRepoName": "my-org/my-app",
      "headRef": "feature-branch",
      "baseRef": "main",
      "prNumber": 3
    },
    "buildConfiguration": "release",
    "isInstallable": true,
    "installUrl": "https://sentry.io/api/0/projects/my-org/my-project/files/installablepreprodartifact/abc123/?response_format=apk",
    "isCodeSignatureValid": null,
    "profileName": null,
    "codesigningType": null,
    "errorCode": null,
    "errorMessage": null
  },
  "actor": {
    "type": "application",
    "id": "sentry",
    "name": "Sentry"
  }
}

Preprod artifact webhooks enable you to:

  • CI/CD Integration: Automatically check build size regressions in your CI pipeline and fail builds that exceed thresholds.
  • Distribution Automation: Trigger downstream distribution workflows (for example, notify testers) when a build is ready for install.
  • Size Tracking: Feed size metrics into external dashboards or alerting systems to monitor app size trends over time.
  • PR Comments: Post size comparison summaries as comments on pull requests to give developers immediate visibility into size impact.
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").