跳转到主要内容

Sentry节点存储Elasticsearch后端

项目描述

info:

Sentry节点存储Elasticsearch后端

https://img.shields.io/pypi/v/sentry_elastic_nodestore.svg

安装

pip install sentry_elastic_nodestore

配置

在您的 sentry.conf.py 中设置 SENTRY_NODESTORE

from elasticsearch import Elasticsearch
es = Elasticsearch(['127.0.0.1:9200'])
SENTRY_NODESTORE = 'sentry_elastic_nodestore.ElasticNodeStorage'
SENTRY_NODESTORE_OPTIONS = {
    'es': es,
    'refresh': False,  # https://elastic.ac.cn/guide/en/elasticsearch/reference/current/indices-refresh.html
}

from sentry.conf.server import *  # default for sentry.conf.py
INSTALLED_APPS = list(INSTALLED_APPS)
INSTALLED_APPS.append('sentry_elastic_nodestore')
INSTALLED_APPS = tuple(INSTALLED_APPS)

使用方法

设置Elasticsearch模板

sentry --config sentry.conf.py django elastic_template

由以下支持