GithubHelp home page GithubHelp logo

sentry-gitlab's Introduction

Sentry Gitlab

A plugin for Sentry which allow you to create issues in your GitLab repositories from Sentry errors.

This module used the sentry-github module as a basis for it structure.

Install

Install the package via pip

pip install sentry-gitlab

Or you can clone to repository to your sentry install.

git clone https://github.com/pancentric/sentry-gitlab.git

Then run the setup script to install the plugin and it's dependencies.

python setup.py install

Restart Sentry and you should see a new plugin under manage integrations for your projects.

Configure

Once enabled you can configure your settings for the project. You can also include default tags you wish to apply to issues created.

settings

I would recommend you create a specific user for Sentry to use with only Reporter priviledges to your projects.

Bugs & Issues

If you find something that doesn't work please create an issue or even better fix it and submit a pull request!

Dependencies

sentry-gitlab's People

Contributors

jbrooksuk avatar rmbl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sentry-gitlab's Issues

Internal Server Error

Internal Server Error
There was an internal server error while processing your request.

You may reference this error as 38b946e07a0a4d81a930b1fc33fdac0a.

Did I do something wrong? I configured the server, the API Key, the namespace, etc. How can I check what's going wrong? Thanks :)

AttributeError: 'Gitlab' object has no attribute 'Project'

Hello all,

I'm using GitLab Community Edition 8.11.2

I have tried to install sentry-gitlab with pip or with cloning the repo.
I have also tried to use the repo name or the repo id.

And everytime i have this error.

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/sentry/../django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry/../django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry/../django/utils/decorators.py", line 29, in _wrapper
    return bound_func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry/../django/utils/decorators.py", line 99, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry/../django/utils/decorators.py", line 25, in bound_func
    return func(self, *args2, **kwargs2)
  File "/usr/local/lib/python2.7/site-packages/sentry/web/frontend/base.py", line 175, in dispatch
    return self.handle(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry/web/frontend/group_plugin_action.py", line 25, in handle
    response = plugin.get_view_response(request, group)
  File "/usr/local/lib/python2.7/site-packages/sentry/plugins/base/v1.py", line 296, in get_view_response
    response = self.view(request, group)
  File "/usr/local/lib/python2.7/site-packages/sentry/plugins/bases/issue.py", line 226, in view
    request=request,
  File "/usr/local/lib/python2.7/site-packages/sentry/../sentry_gitlab/plugin.py", line 88, in create_issue
AttributeError: 'Gitlab' object has no attribute 'Project'
[ERROR] django.request: Internal Server Error: /sentry/php-error/issues/2263/actions/gitlab/

Do you know why ?

Thank you.

Fail to install dependencies (with sentry 7.7.1)

I installed sentry 7.7.1. When I install sentry-gitlab (pip install sentry-gitlab) the installation succesful but when I execute CLI command like sentry cleanup --days=30) I see a conflict with dependencies version.

Failed to load app 'gitlab':
Traceback (most recent call last):
  File "/home/sentry/www/local/lib/python2.7/site-packages/sentry/utils/runner.py", line 243, in install_plugins
    plugin = ep.load()
  File "/home/sentry/www/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2369, in load
    self.require(*args, **kwargs)
  File "/home/sentry/www/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2386, in require
    items = working_set.resolve(reqs, env, installer)
  File "/home/sentry/www/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 851, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
ContextualVersionConflict: (kombu 3.0.26 (/home/sentry/www/lib/python2.7/site-packages), Requirement.parse('kombu<3.1,>=3.0.29'), set(['celery']))

Failed to load plugin 'gitlab':
Traceback (most recent call last):
  File "/home/sentry/www/local/lib/python2.7/site-packages/sentry/utils/runner.py", line 255, in install_plugins
    plugin = ep.load()
  File "/home/sentry/www/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2369, in load
    self.require(*args, **kwargs)
  File "/home/sentry/www/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2386, in require
    items = working_set.resolve(reqs, env, installer)
  File "/home/sentry/www/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 851, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
ContextualVersionConflict: (kombu 3.0.26 (/home/sentry/www/lib/python2.7/site-packages), Requirement.parse('kombu<3.1,>=3.0.29'), set(['celery']))


Include exception

It's great that sentry-gitlab adds a link to the Sentry view, but having an inline exception block would be ideal as we could easily link to other issues if they're related.

Error while creating Gitlab issue

I got this error

Error creating issue: [u"Error Communicating with GitLab: HTTPConnectionPool(host='git.eton.vn', port=80): Max retries exceeded with url: /api/v4/user (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb032dbd8d0>: Failed to establish a new connection: [Errno 111] Connection refused',))"]

The access token for sentry-gitlab already has api and read_user scope.
The git server is: git.eton.vn

Please help me on this.

Call of deprecated methods

plugin calls Project and Issue objects, with are marked as deprecated. This raise following warning
DeprecationWarning: 'Project' is deprecated, use 'projects' instead
DeprecationWarning: 'Issue' is deprecated, use 'issues' instead

Error repositories

Hello,
I am trying to configure the repositories option in my sentry version 8.18.0.

Select Add Repository > Save Changes

I get the message:
You need to associate an identity with GitHub before you can create issues with this service.

Selecting the option "Associate Identity" I get the message:

Oops! Something went wrong
It looks like you've hit an issue in our server API. Do not worry though! We use Sentry to monitor Sentry and it's likely we're already looking into this!
If you're daring, you may want to try the following:
Give it a few seconds and reload the page.
If all else fails, create an issue with more details.

Log Message
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/sentry/../django/core/handlers/base.py", line 112, in get_response
response = wrapped_callback(request, callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/site-packages/social_auth/decorators.py", line 27, in wrapper
raise WrongBackend(backend)
WrongBackend
00:57:42 [ERROR] django.request: Internal Server Error: /account/settings/social/associate/github/ (status_code=500 request=<WSGIRequest
path:/account/settings/social/associate/github/,
GET:<QueryDict: {u'next': [u'/organizations/sentry/repos/']}>,
POST:<QueryDict: {}>,
COOKIES:{'sc': 'DlQy0rlVnFZM5eM1niPcADuVtINg4c0C',
'sentrysid': '.eJxrYKotZNQI5Y1PLC3JiC8tTi2Kz0zxZgzlTEwuySxLzS9KL2SKYGNgYChOzSspqixkDmUpLk3Jj-ABChW4-WSnl7oVpWQ5eUdwAQVKUotLkvPzszNTwVrK84uyU1NChZDMTkpMzk7NSwlVghinV1qSmVOsB5LXc81NzMxxBLKcoGqYi4vzIxiB5hiW6gEAkM82Sw:1ddMrm:Bw7YJF31bYRJY7gdqUqqdoFLOi0'},
META:{u'CSRF_COOKIE': u'DlQy0rlVnFZM5eM1niPcADuVtINg4c0C',
'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,
/*;q=0.8',
'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch, br',
'HTTP_ACCEPT_LANGUAGE': 'pt-BR,pt;q=0.8,en-US;q=0.6,en;q=0.4',
'HTTP_CONNECTION': 'close',
'HTTP_COOKIE': 'sentrysid=".eJxrYKotZNQI5Y1PLC3JiC8tTi2Kz0zxZgzlTEwuySxLzS9KL2SKYGNgYChOzSspqixkDmUpLk3Jj-ABChW4-WSnl7oVpWQ5eUdwAQVKUotLkvPzszNTwVrK84uyU1NChZDMTkpMzk7NSwlVghinV1qSmVOsB5LXc81NzMxxBLKcoGqYi4vzIxiB5hiW6gEAkM82Sw:1ddMrm:Bw7YJF31bYRJY7gdqUqqdoFLOi0"; sc=DlQy0rlVnFZM5eM1niPcADuVtINg4c0C',
'HTTP_HOST': 'example.com',
'HTTP_REFERER': 'https://example.com/organizations/sentry/repos/',
'HTTP_UPGRADE_INSECURE_REQUESTS': '1',
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36',
'HTTP_X_FORWARDED_FOR': '191.255.56.97',
'HTTP_X_REAL_IP': '191.255.56.97',
'PATH_INFO': u'/account/settings/social/associate/github/',
'QUERY_STRING': 'next=%2Forganizations%2Fsentry%2Frepos%2F',
'REMOTE_ADDR': '191.255.56.97',
'REQUEST_METHOD': 'GET',
'REQUEST_URI': '/account/settings/social/associate/github/?next=%2Forganizations%2Fsentry%2Frepos%2F',
'SCRIPT_NAME': u'',
'SERVER_NAME': '53db031e311e',
'SERVER_PORT': '9000',
'SERVER_PROTOCOL': 'HTTP/1.0',
'uwsgi.core': 2,
'uwsgi.node': '53db031e311e',
'uwsgi.version': '2.0.15',
'wsgi.errors': <open file 'wsgi_errors', mode 'w' at 0x7ff5d25a6780>,
'wsgi.file_wrapper': ,
'wsgi.input': <uwsgi._Input object at 0x7ff5d01d68d0>,
'wsgi.multiprocess': True,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}>)

Sorry about my English!!!!

Installation

I can't get sentry-gitlab to install in my version of Sentry. I followed the default instructions, but I've no idea where it should be cloned to as the README isn't very detailed.

After upgrade to Sentry 8.5.1 and sentry-gitlab 0.2.0 Gitlab integration lost from app

Hello.

I had and issue with gitlab integration in prev. version, when creating issue from Sentry, it fallback to error message to fail to submit issue to Gitlab. It worked before.

Therefore I upgraded today Sentry to 8.5.1 (8.4.1 prev) and sentry-gitlab to 0.2.0. After sentry restart all of my issue integrations are lost, including Gitlab.

Is Sentry 8.5.1 compatible with 0.2.0 ?

Here is my pip freeze:

amqp==1.4.9
anyjson==0.3.3
BeautifulSoup==3.2.1
billiard==3.3.0.23
celery==3.1.18
cffi==1.7.0
click==6.6
contextlib2==0.5.3
cryptography==1.4
cssselect==0.9.2
cssutils==0.9.10
Django==1.6.11
django-bitfield==1.7.1
django-celery==3.0.23
django-crispy-forms==1.4.0
django-debug-toolbar==1.3.2
django-indexer==0.3.0
django-jsonfield==0.9.13
django-paging==0.2.5
django-picklefield==0.3.2
django-recaptcha==1.0.5
django-redis==3.8.3
django-redis-cache==0.13.0
django-social-auth==0.7.28
django-social-auth-trello==1.0.3
django-static-compiler==0.3.3
django-statsd-mozilla==0.3.14
django-sudo==2.0.1
django-templatetag-sugar==1.0
djangorestframework==2.3.14
email-reply-parser==0.2.0
enum34==1.1.6
exam==0.10.6
gunicorn==19.3.0
hiredis==0.1.6
honcho==0.7.1
httpagentparser==1.2.2
httplib2==0.9.2
idna==2.1
ipaddr==2.1.11
ipaddress==1.0.16
kombu==3.0.30
logan==0.7.1
lxml==3.6.0
Markdown==2.4.1
mock==1.0.1
msgpack-python==0.4.7
ndg-httpsclient==0.4.1
nydus==0.11.0
oauth2==1.9.0.post1
oauthlib==1.1.2
petname==1.7
Pillow==3.2.0
progressbar==2.3
psycopg2==2.6.1
py==1.4.31
pyasn1==0.1.9
pycparser==2.14
Pygments==1.6
pynliner==0.5.1
pyOpenSSL==16.0.0
pytest==2.6.4
pytest-django==2.9.1
python-dateutil==2.5.3
python-gitlab==0.13
python-memcached==1.58
python-openid==2.2.5
python-u2flib-server==4.0.1
pytz==2016.4
PyYAML==3.11
qrcode==5.3
raven==5.21.0
rb==1.4
redis==2.10.5
requests==2.10.0
requests-oauthlib==0.6.1
sentry==8.5.1
sentry-bitbucket==0.1.5
sentry-github==0.1.2
sentry-gitlab==0.2.0
setproctitle==1.1.10
simplejson==3.8.2
six==1.10.0
South==1.0.1
sqlparse==0.1.19
statsd==3.1
toronado==0.0.7
ua-parser==0.7.1
urllib3==1.14
uWSGI==2.0.13.1

[Internal server error] creating issue on gitlab

Hello, i decide to install this plugin in my sentry server, but unfortunately i get an error when i try create an issue on Gitlab.
The error is:
screenshot 2014-06-20 11 20 35
-----//-----
screenshot 2014-06-20 11 21 29
On the server.

Someone one can help me to solve this problem please?

Thank you so much.

Add labels

Having an optional configuration in sentry-gitlab that would apply labels to issues would be super cool. Any error that comes through from production should automatically be labelled as bug and critical.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.