Bitbucket data ingestion
Bitbucket records what changed in your repositories and who changed it. Sending those events to Coralogix puts that history next to your runtime telemetry, so a change in behavior can be lined up against the push or pull request that preceded it.
The Contextual Data integration generates the webhook URL; Bitbucket posts to it.
What you need
- A Bitbucket repository you have permission to configure webhooks on.
- A Coralogix API key. You can create one during setup.
- An application and subsystem name to file the events under.
Generate the URL in Coralogix
Select Data Flow, then Contextual Data, then Bitbucket, then Add, then Add new.
Enter a Name. Supply Your API Key or select Create new key. Enter an App Name and Subsystem Name.
Select Generate URL and copy the result.
Shows the form that produces the webhook URL Bitbucket posts to.
Create the webhook in Bitbucket
Sign in to Bitbucket, open the repository you want to collect events from, then select Repository settings, then Webhooks.
Select Add webhook, enter a Title, paste the generated URL into URL, and choose the Triggers you want. Select Save.
Shows the form and the trigger choice between repository pushes and the full event list.
Example log
{
"source_system": "bitbucket",
"bitbucket": {
"changes": {
"description": {
"new": "My test repo",
"old": "My first repo"
}
},
"repository": {
"scm": "git",
"website": null,
"uuid": "{0a519024-7bc7-49f8-add8-2fbe1d2cf66c}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/test_user/testrepo"
},
"html": {
"href": "https://bitbucket.org/test_user/testrepo"
},
"avatar": {
"href": "https://bytebucket.org/ravatar/%7B0a519024-7bc7-49f8-add8-2fbe1d2cf66c%7D?ts=default"
}
},
"project": {
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/workspaces/test_user/projects/AD"
},
"html": {
"href": "https://bitbucket.org/test_user/workspace/projects/AD"
},
"avatar": {
"href": "https://bitbucket.org/account/user/test_user/projects/AD/avatar/32?ts=1623065966"
}
},
"type": "project",
"name": "TestProject",
"key": "AD",
"uuid": "{12345678-b705-40c8-af4c-7905c047d73b}"
},
"full_name": "test_user/testrepo",
"owner": {
"display_name": "John Smith",
"uuid": "{1234abcd-0000-aaaa-1111-0123456789ab}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/%1234abcd-0000-aaaa-1111-0123456789ab"
},
"html": {
"href": "https://bitbucket.org/%1234abcd-0000-aaaa-1111-0123456789ab/"
},
"avatar": {
"href": "https://secure.gravatar.com/avatar/d8dee7d2f2ac223263989224f7f99fe3?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAP-2.png"
}
},
"type": "user",
"nickname": "John Smith",
"account_id": "01234567892cc1006957e666"
},
"workspace": {
"slug": "test_user",
"type": "workspace",
"name": "John Smith",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/workspaces/test_user"
},
"html": {
"href": "https://bitbucket.org/test_user/"
},
"avatar": {
"href": "https://bitbucket.org/workspaces/test_user/avatar/?ts=1623065881"
}
},
"uuid": "{12345678-1111-2222-aaaa-74e612ecd2ae}"
},
"type": "repository",
"is_private": true,
"name": "TestRepo"
},
"actor": {
"display_name": "John Smith",
"uuid": "{12345678-1111-2222-bbbb-74e612ecd2ae}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/%1234abcd-0000-aaaa-1111-0123456789ab"
},
"html": {
"href": "https://bitbucket.org/%1234abcd-0000-aaaa-1111-0123456789ab/"
},
"avatar": {
"href": "https://secure.gravatar.com/avatar/d8dee7d2f2ac223263989224f7f99fe3?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAP-2.png"
}
},
"type": "user",
"nickname": "John Smith",
"account_id": "01234567892cc1006957e666"
}
}
}
