Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLN] Add trace for memberlist update #1912

Merged
merged 6 commits into from
Mar 22, 2024
Merged
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
10 changes: 10 additions & 0 deletions chromadb/segment/impl/distributed/segment_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
from kubernetes import client, config, watch
from kubernetes.client.rest import ApiException
import threading
from chromadb.telemetry.opentelemetry import (
OpenTelemetryGranularity,
add_attributes_to_current_span,
trace_method,
)

from chromadb.utils.rendezvous_hash import assign, murmur3hasher

Expand Down Expand Up @@ -226,6 +231,11 @@ def register_updated_segment_callback(
) -> None:
raise NotImplementedError()

@trace_method(
"RendezvousHashSegmentDirectory._update_memberlist",
OpenTelemetryGranularity.ALL,
)
def _update_memberlist(self, memberlist: Memberlist) -> None:
with self._curr_memberlist_mutex:
add_attributes_to_current_span({"new_memberlist": memberlist})
self._curr_memberlist = memberlist
Loading