mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
add logfire instrumentation to services and repository code
Signed-off-by: phernandez <paul@basicmachines.co>
This commit is contained in:
@@ -4,6 +4,7 @@ import fnmatch
|
||||
import logging
|
||||
import os
|
||||
from typing import Dict, List, Optional, Sequence
|
||||
import logfire
|
||||
|
||||
from basic_memory.models import Entity
|
||||
from basic_memory.repository import EntityRepository
|
||||
@@ -23,6 +24,7 @@ class DirectoryService:
|
||||
"""
|
||||
self.entity_repository = entity_repository
|
||||
|
||||
@logfire.instrument(record_return=True)
|
||||
async def get_directory_tree(self) -> DirectoryNode:
|
||||
"""Build a hierarchical directory tree from indexed files."""
|
||||
|
||||
@@ -90,6 +92,7 @@ class DirectoryService:
|
||||
# Return the root node with its children
|
||||
return root_node
|
||||
|
||||
@logfire.instrument(record_return=True)
|
||||
async def get_directory_structure(self) -> DirectoryNode:
|
||||
"""Build a hierarchical directory structure without file details.
|
||||
|
||||
@@ -133,6 +136,7 @@ class DirectoryService:
|
||||
|
||||
return root_node
|
||||
|
||||
@logfire.instrument(record_return=True)
|
||||
async def list_directory(
|
||||
self,
|
||||
dir_name: str = "/",
|
||||
|
||||
Reference in New Issue
Block a user