Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions elementary/tracking/tracking_interface.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import hashlib
from typing import Any, Dict, Optional

import posthog

from elementary.config.config import Config
from elementary.utils.hash import hash


class Tracking:
Expand Down Expand Up @@ -36,7 +36,7 @@ def _send_event(

@staticmethod
def _hash(content: str):
return hashlib.sha256(content.encode("utf-8")).hexdigest()
return hash(content)

def record_internal_exception(self, exc: Exception):
pass
Expand Down
5 changes: 5 additions & 0 deletions elementary/utils/hash.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import hashlib


def hash(content: str):
return hashlib.sha256(content.encode("utf-8")).hexdigest()