Last active
August 28, 2022 15:20
-
-
Save alexlarkou/d7223b1dc2394e37cd04884390e59de6 to your computer and use it in GitHub Desktop.
Elasticsearch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from elasticsearch_dsl import Date, Document, Keyword, Nested, Text, Integer | |
class HttpLog(Document): | |
"""The schema for a Log document.""" | |
level = Keyword() | |
request = Nested(properties={"body": Text(analyzer="snowball"), "headers": Keyword(), "arguments": Keyword()}) | |
response = Nested(properties={"message": Text(analyzer="snowball"), "status": Integer()}) | |
timestamp = Date() | |
stacktrace = Text() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment