Sentry: Instance-level GitLab integration

Created on 13 Apr 2019  ·  13Comments  ·  Source: getsentry/sentry

I am unable to figure out how to set up Sentry integration with GitLab on the instance level. The current requirement to specify a group will limit the Sentry scope for one group and we have tons of groups, how does this suppose to work?

Integrations

Most helpful comment

@markstory Thanks for the confirmation!

I've forked the project, made a small modification to handle subgroups, and deployed it on my instance to test. I'm able to work with projects in subgroups without issues, so far. I'll submit a PR for consideration later.

Screen Shot 2019-10-18 at 11 10 50 AM

Looking at the GitLab integration code, I don't think it would take too much effort to support whole, self-hosted GitLab instances as opposed to group-level integrations. I'll try to find some time next week to work on that.

All 13 comments

You have to setup one integration per group that you want to use repositories from.

I did it now. Also for subgroups within groups. So, when the feature to link a GitLab issue from the Sentry issue, I see an endless list of "Link GitLab issue" links. I don't think this is really something that can sustain usage in a larger organisation. It would work if repositories would be scoped by Sentry projects, so we won't get that many links, but that's not the case.

Needing to bind subgroups is something that we can fix in the future. Up until a very recent release gitlab didn't support searching repositories in sub-groups.

As for the duplicate groups how many groups do you have?

I won't say "duplicate", but the integration scope is global, so each group or subgroup I add as a separate GitLab integration (which is quite tiring in itself), I get one more the "Link issue to GitLab" link in the Sentry issue. Since we have about 30 groups and some have subgroups, the total count comes to about 50.

Thanks for the feedback on some of the challenges you're having with our current GitLab integration. I'll forward this along to the product folks internally :smile:

Any ETA on this? We want to roll out sentry company wide but this is kind of blocking it.

@thereapman There is no ETA at this point in time.

I have the same issue here: hosted GitLab & hosted Sentry and dozens of groups, so if I integrate them all, I will have the same problem shown in #12906. There isn't any workaround as of now too.

Same problem here, we have many different teams on the company, but even with a main group with subgroups the integration couldn't find the repositories, i had to add each of the subgroups

I just linked Sentry up to my self-hosted GitLab instance and quickly discovered this limitation. I have lots of nested subgroups and it'd be completely impractical to “integrate” each one individually. The integration also requires a group to be specified, which can't cover all the top-level groups in an instance.

Is getsentry/sentry-gitlab the right repository for this integration? It hasn't had any activity in over two years.

Edit: I found https://github.com/getsentry/sentry-plugins/tree/master/src/sentry_plugins/gitlab, which mentions it's been deprecated by the global integration. Anyone know where the code is for that?

Edit 2: The GitLab global integration code is here: https://github.com/getsentry/sentry/tree/master/src/sentry/integrations/gitlab

@kinghuang The src/sentry/integrations/gitlab code is the global organization integration. All the other implementations are deprecated.

@markstory Thanks for the confirmation!

I've forked the project, made a small modification to handle subgroups, and deployed it on my instance to test. I'm able to work with projects in subgroups without issues, so far. I'll submit a PR for consideration later.

Screen Shot 2019-10-18 at 11 10 50 AM

Looking at the GitLab integration code, I don't think it would take too much effort to support whole, self-hosted GitLab instances as opposed to group-level integrations. I'll try to find some time next week to work on that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dcramer picture dcramer  ·  4Comments

bruno-garcia picture bruno-garcia  ·  3Comments

Aletz-Arce picture Aletz-Arce  ·  3Comments

phiresky picture phiresky  ·  3Comments

Leroygirl picture Leroygirl  ·  3Comments