Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notify deploys to Bugsnag #954

Open
sauloperez opened this issue Dec 5, 2018 · 2 comments
Open

Notify deploys to Bugsnag #954

sauloperez opened this issue Dec 5, 2018 · 2 comments

Comments

@sauloperez
Copy link
Contributor

Description

Bugsnag would we much more useful if we could know:

  • When a deploy happened. I guess that would be displayed in Bugsnag's timeline as an axis.
  • Know the release being used on a particular failure. This will help trace down its root cause.

This will also help us correlate issues when experiencing errors on production.

Possible fix

Bugsnag's documentation is quite good and has all the details we need.

In https://docs.bugsnag.com/platforms/ruby/rails/#tracking-releases we can find how to provide the app version to the Bugsnag client. This will definitely need an ENV var set at deployment time containing the release number.

None of the build & deploy integrations works for us but it is as simple as a performing an HTTP request with the required details, like follows:

$ curl https://build.bugsnag.com/ \
    --header "Content-Type: application/json" \
    --data '{
      "apiKey": "YOUR_API_KEY_HERE",
      "appVersion": "1.2.3",
      "releaseStage": "production",
      "builderName": "Joe Summer",
      "sourceControl": {
        "provider": "github",
        "repository": "https://github.com/owner/repo",
        "revision": "52097f461bf76a824212eb11de53467c094d0cd4"
      },
      "metadata": {"feature-93": "New settings page"}
    }'

See details: https://docs.bugsnag.com/build-integrations/#if-your-build-tool-is-not-supported.

We can also check out the implementation of their Capistrano integration

@sauloperez
Copy link
Contributor Author

Notifying should be rather straightforward with Ansible's uri_module

@sauloperez
Copy link
Contributor Author

sauloperez commented Sep 17, 2019

Note however that appVersion cannot be provided yet because the version is not yet kept in the codebase. It's just a git tag.

@sigmundpetersen sigmundpetersen transferred this issue from openfoodfoundation/openfoodnetwork Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: All the things 💤
Development

No branches or pull requests

1 participant