Skip to content

Commit

Permalink
add instance id
Browse files Browse the repository at this point in the history
  • Loading branch information
psimsa committed Jul 6, 2023
1 parent adfdbb4 commit b246239
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/oig_cloud/api/oig_cloud_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ def __init__(
self._last_update = datetime.datetime(1, 1, 1, 0, 0)
self._username = username
self._password = password
self._hass_id = hass.data["core.uuid"]
self._email_hash = hashlib.md5(self._username.encode("utf-8")).hexdigest()
self._initialize_span()

self._initialize_span()
if not self._no_telemetry:
span.set_attributes(
{
Expand All @@ -63,6 +64,7 @@ def _initialize_span(self):
span.set_attributes(
{
"email_hash": self._email_hash,
"service.instance.id": self._hass_id
}
)

Expand Down

0 comments on commit b246239

Please sign in to comment.