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:
- Navigate to Settings > Developer Settings > New Internal Integration
- Fill out required Integration Details
- Enable
project:readpermission or higher - Select
preprod_artifactfor 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 failspreprod_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_completedorbuild_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
COMPLETEDorFAILED
- type: object
- description: Metadata about the application
| Field | Type | Description |
|---|---|---|
appId | string (nullable) | Application bundle identifier |
name | string (nullable) | Application name |
version | string (nullable) | Application version string |
buildNumber | integer (nullable) | Build number |
artifactType | string (nullable) | Type of artifact (for example, XCARCHIVE, AAB, IPA, APK) |
dateAdded | string (nullable) | ISO 8601 timestamp when the artifact was uploaded |
dateBuilt | string (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.
| Field | Type | Description |
|---|---|---|
headSha | string (nullable) | Commit SHA of the head branch |
baseSha | string (nullable) | Commit SHA of the base branch |
provider | string (nullable) | Source code provider (for example, github) |
headRepoName | string (nullable) | Full repository name of the head branch |
baseRepoName | string (nullable) | Full repository name of the base branch |
headRef | string (nullable) | Head branch name |
baseRef | string (nullable) | Base branch name |
prNumber | integer (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 failedTIMEOUT- Analysis timed outUNSUPPORTED_ARTIFACT- The artifact type is not supported for size analysisNO_QUOTA- Organization has no remaining analysis quota
Build distribution error codes:
PROCESSING_ERROR- Distribution processing failedNO_QUOTA- Organization has no remaining distribution quotaSKIPPED- Distribution processing was skippedUNKNOWN- 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)
| Field | Type | Description |
|---|---|---|
metricsArtifactType | string | Component type (for example, MAIN_ARTIFACT, WATCH_ARTIFACT, APP_CLIP_ARTIFACT) |
identifier | string (nullable) | Bundle identifier of the component |
state | string | Comparison state (SUCCESS or FAILED) |
errorCode | string (nullable) | Error code if the comparison failed (see below) |
errorMessage | string (nullable) | Error message if the comparison failed |
sizeMetricDiff | object (nullable) | Size difference metrics |
Possible comparison error codes:
NO_BASE_METRIC- No matching base artifact size metric found for this componentTIMEOUT- The size comparison timed outFILE_ERROR- The comparison result file is missing or could not be foundPARSE_ERROR- Failed to parse the comparison result dataUNKNOWN- An unknown error occurred
The sizeMetricDiff object contains:
| Field | Type | Description |
|---|---|---|
metricsArtifactType | string | Component type |
identifier | string (nullable) | Bundle identifier |
headInstallSize | integer | Install size of the head build in bytes |
headDownloadSize | integer | Download size of the head build in bytes |
baseInstallSize | integer | Install size of the base build in bytes |
baseDownloadSize | integer | Download size of the base build in bytes |
{
"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)
{
"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.
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").