def get_internal_source(project): """ Returns the source configuration for a Sentry project. """ internal_url_prefix = options.get("system.internal-url-prefix") if not internal_url_prefix: internal_url_prefix = options.get("system.url-prefix") if sys.platform == "darwin": internal_url_prefix = internal_url_prefix.replace( "localhost", "host.docker.internal").replace("127.0.0.1", "host.docker.internal") assert internal_url_prefix sentry_source_url = "{}{}".format( internal_url_prefix.rstrip("/"), reverse( "sentry-api-0-dsym-files", kwargs={ "organization_slug": project.organization.slug, "project_slug": project.slug }, ), ) return { "type": "sentry", "id": INTERNAL_SOURCE_NAME, "url": sentry_source_url, "token": get_system_token(), }
def _create_symbolication_task(sess, base_url, project_id, sentry_source_url, signal, stacktraces, modules): request = { 'signal': signal, 'sources': [{ 'type': 'sentry', 'id': '__sentry_internal__', 'url': sentry_source_url, 'token': get_system_token(), }, { 'type': 'http', 'id': 'microsoft', 'layout': 'symstore', 'filetypes': ['pdb', 'pe'], 'url': 'https://msdl.microsoft.com/download/symbols/', 'is_public': True, }], 'request': { 'timeout': SYMBOLICATOR_TIMEOUT, }, 'stacktraces': stacktraces, 'modules': modules, } url = '{base_url}/symbolicate?timeout={timeout}&scope={scope}'.format( base_url=base_url, timeout=SYMBOLICATOR_TIMEOUT, scope=project_id, ) return sess.post(url, json=request)
def get_internal_source(project): """ Returns the source configuration for a Sentry project. """ internal_url_prefix = options.get('system.internal-url-prefix') if not internal_url_prefix: internal_url_prefix = options.get('system.url-prefix') if sys.platform == 'darwin': internal_url_prefix = internal_url_prefix \ .replace("localhost", "host.docker.internal") \ .replace("127.0.0.1", "host.docker.internal") assert internal_url_prefix sentry_source_url = '%s%s' % ( internal_url_prefix.rstrip('/'), reverse('sentry-api-0-dsym-files', kwargs={ 'organization_slug': project.organization.slug, 'project_slug': project.slug })) return { 'type': 'sentry', 'id': 'sentry:project', 'url': sentry_source_url, 'token': get_system_token(), }
def get_internal_source(project): """ Returns the source configuration for a Sentry project. """ internal_url_prefix = options.get('system.internal-url-prefix') if not internal_url_prefix: internal_url_prefix = options.get('system.url-prefix') if sys.platform == 'darwin': internal_url_prefix = internal_url_prefix \ .replace("localhost", "host.docker.internal") \ .replace("127.0.0.1", "host.docker.internal") assert internal_url_prefix sentry_source_url = '%s%s' % ( internal_url_prefix.rstrip('/'), reverse('sentry-api-0-dsym-files', kwargs={ 'organization_slug': project.organization.slug, 'project_slug': project.slug }) ) return { 'type': 'sentry', 'id': 'sentry:project', 'url': sentry_source_url, 'token': get_system_token(), }
def get_internal_source(project): """ Returns the source configuration for a Sentry project. """ internal_url_prefix = options.get('system.internal-url-prefix') \ or options.get('system.url-prefix') assert internal_url_prefix sentry_source_url = '%s%s' % ( internal_url_prefix.rstrip('/'), reverse('sentry-api-0-dsym-files', kwargs={ 'organization_slug': project.organization.slug, 'project_slug': project.slug })) return { 'type': 'sentry', 'id': 'sentry:project', 'url': sentry_source_url, 'token': get_system_token(), }