terraform-provider-gitlab icon indicating copy to clipboard operation
terraform-provider-gitlab copied to clipboard

Implement error_tracking API

Open svenstaro opened this issue 3 years ago • 6 comments

There is currently no support for managing the Sentry integration via the error_tracking API https://docs.gitlab.com/ee/api/error_tracking.html. Seems pretty easy to add, though.

svenstaro avatar Oct 08 '20 14:10 svenstaro

Would be useful to be able to read the gitlab DSN to set-up error reporting automatically.

rescribet avatar Nov 10 '21 11:11 rescribet

@timofurrer Am I correct in assuming we would need upstream work for this in go-gitlab? Probably a new connector as I don't think this would fit into any of the others

Shocktrooper avatar Mar 20 '22 18:03 Shocktrooper

@Shocktrooper Yes, if it's not already in go-gitlab - it needs to support it first. We've decided to exclusively use go-gitlab :)

timofurrer avatar Mar 20 '22 18:03 timofurrer

I have started to work on this

Shocktrooper avatar May 19 '22 13:05 Shocktrooper

Note for @timofurrer / @armsnyder / @PatrickRice-KSC when it comes to review time. I was playing around with the go-gitlab library directly as I was developing it and it seems you cannot turn-on/configure the integration at all via the API. Attempting to enable or configure the integration without sentry or also without the integrated backend results in a 404. If you do happen to have a live sentry instance you can pull values from you have to initially configure error tracking via the UI. The API does not have the capability to configure an external sentry instance only enable/disable the settings once set in the UI.

2022/05/19 18:40:22 PATCH https://somegitlabinstance.com/api/v4/projects/123/error_tracking/settings: 404 {message: 404 Error Tracking Setting Not Found}

Going forward we should just turn on the feature flag in the startup script and just test this without sentry and only use the integrated backend.

Shocktrooper avatar May 20 '22 02:05 Shocktrooper

Going forward we should just turn on the feature flag in the startup script and just test this without sentry and only use the integrated backend.

Yes, I agree. We should avoid having any external services required for our automated testing!

I've just reviewed the PR in go-gitlab, too ;)

timofurrer avatar May 21 '22 08:05 timofurrer