Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
bd804fa
Implement concurrent.futures instrumentation for OpenTelemetry contex…
fenilfaldu May 29, 2025
cfb3619
ruff checks :)
fenilfaldu May 29, 2025
ea8401f
ruff check again :(
fenilfaldu May 29, 2025
d17f14e
damn ruff +_+
fenilfaldu May 29, 2025
4c2faa2
heck ruff again
fenilfaldu May 29, 2025
791f6b9
Added Mem0 and Concurrent Futures Instrumentation(for testing pr is a…
fenilfaldu May 31, 2025
66a1ded
ruff checks
fenilfaldu May 31, 2025
7baaf65
Merge branch 'main' into mem0_instrumentation
fenilfaldu May 31, 2025
569f9f4
added test and doc
fenilfaldu Jun 2, 2025
853eb54
why ruff again :(
fenilfaldu Jun 2, 2025
aac9013
ah! here we go again
fenilfaldu Jun 2, 2025
6d9db2e
Merge branch 'main' into add-concurrency-instrumentaion
Dwij1704 Jun 2, 2025
6f56d7f
Merge branch 'main' into mem0_instrumentation
fenilfaldu Jun 2, 2025
e280ec9
Merge branch 'main' into add-concurrency-instrumentaion
fenilfaldu Jun 2, 2025
e367492
updated the constants
fenilfaldu Jun 2, 2025
8db244a
Merge branch 'main' into mem0_instrumentation
fenilfaldu Jun 2, 2025
0f09692
constants update
fenilfaldu Jun 2, 2025
67bb813
Merge branch 'main' into mem0_instrumentation
fenilfaldu Jun 5, 2025
397760c
Merge branch 'main' into add-concurrency-instrumentaion
Dwij1704 Jun 6, 2025
9e0a7b5
Merge branch 'main' of https://github.com/AgentOps-AI/agentops into a…
fenilfaldu Jun 6, 2025
cd53e9d
refactor the instrumentation with utlity instrumentation
fenilfaldu Jun 7, 2025
1ffa1ea
Merge branch 'main' of https://github.com/AgentOps-AI/agentops into a…
fenilfaldu Jun 7, 2025
4a505c2
resolved merge conflicts
fenilfaldu Jun 7, 2025
c283fdd
code cleanup
fenilfaldu Jun 7, 2025
e4850f5
Merge branch 'main' into mem0_instrumentation
fenilfaldu Jun 8, 2025
87f7fe9
Merge branch 'main' into mem0_instrumentation
fenilfaldu Jun 10, 2025
2e70770
Merge branch 'main' into mem0_instrumentation
fenilfaldu Jun 10, 2025
ea8c1f0
added v2 docs
fenilfaldu Jun 10, 2025
9ce35a0
Merge branch 'main' into mem0_instrumentation
fenilfaldu Jun 11, 2025
86febd5
Merge branch 'main' of https://github.com/AgentOps-AI/agentops into m…
fenilfaldu Jun 12, 2025
16c8e7c
removed the utility instrumentation from mem0
fenilfaldu Jun 12, 2025
3e186e8
Merge branch 'main' into mem0_instrumentation
fenilfaldu Jun 12, 2025
f10eea3
Merge branch 'main' into mem0_instrumentation
Dwij1704 Jun 12, 2025
2d0724d
Merge branch 'main' of https://github.com/AgentOps-AI/agentops into m…
fenilfaldu Jun 12, 2025
d8be14a
v2 docs added
fenilfaldu Jun 13, 2025
6ec74b6
Merge branch 'main' of https://github.com/AgentOps-AI/agentops into m…
fenilfaldu Jun 13, 2025
c6f46e1
ruff checks
fenilfaldu Jun 13, 2025
cdf0cdc
Delete examples/mem0/mem0_memory_basic_example.py
fenilfaldu Jun 13, 2025
fc27638
ruff checks again
fenilfaldu Jun 13, 2025
ab37436
Format mem0_memory_basic_example.py
fenilfaldu Jun 13, 2025
0267d5e
Merge branch 'mem0_instrumentation' of https://github.com/AgentOps-AI…
fenilfaldu Jun 13, 2025
2cf12a1
code cleanup
fenilfaldu Jun 13, 2025
3c8f0a8
add "Example" to Title
dot-agi Jun 13, 2025
c6837ad
some doc changes
dot-agi Jun 13, 2025
5d12233
Merge branch 'main' into mem0_instrumentation
dot-agi Jun 13, 2025
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
6 changes: 6 additions & 0 deletions agentops/instrumentation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ class InstrumentorConfig(TypedDict):
"min_version": "0.1.0",
"package_name": "google-genai", # Actual pip package name
},
"mem0": {
"module_name": "agentops.instrumentation.mem0",
"class_name": "Mem0Instrumentor",
"min_version": "0.1.0",
"package_name": "mem0ai",
},
}

# Configuration for utility instrumentors
Expand Down
53 changes: 53 additions & 0 deletions agentops/instrumentation/mem0/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
"""Mem0 instrumentation library for AgentOps.

This package provides instrumentation for the Mem0 memory management system,
capturing telemetry data for memory operations.
"""

import logging

Check warning on line 7 in agentops/instrumentation/mem0/__init__.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/mem0/__init__.py#L7

Added line #L7 was not covered by tests

# Import memory operation wrappers
from .memory import (

Check warning on line 10 in agentops/instrumentation/mem0/__init__.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/mem0/__init__.py#L10

Added line #L10 was not covered by tests
mem0_add_wrapper,
mem0_search_wrapper,
mem0_get_all_wrapper,
mem0_get_wrapper,
mem0_delete_wrapper,
mem0_update_wrapper,
mem0_delete_all_wrapper,
mem0_history_wrapper,
)


def get_version() -> str:
try:
from importlib.metadata import version

Check warning on line 24 in agentops/instrumentation/mem0/__init__.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/mem0/__init__.py#L22-L24

Added lines #L22 - L24 were not covered by tests

return version("mem0ai")
except ImportError:
logger.debug("Could not find Mem0 SDK version")
return "unknown"

Check warning on line 29 in agentops/instrumentation/mem0/__init__.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/mem0/__init__.py#L26-L29

Added lines #L26 - L29 were not covered by tests


LIBRARY_NAME = "agentops.instrumentation.mem0"
LIBRARY_VERSION = "1.0.0"

Check warning on line 33 in agentops/instrumentation/mem0/__init__.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/mem0/__init__.py#L32-L33

Added lines #L32 - L33 were not covered by tests

logger = logging.getLogger(__name__)

Check warning on line 35 in agentops/instrumentation/mem0/__init__.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/mem0/__init__.py#L35

Added line #L35 was not covered by tests

# Import after defining constants to avoid circular imports
from agentops.instrumentation.mem0.instrumentor import Mem0Instrumentor # noqa: E402

Check warning on line 38 in agentops/instrumentation/mem0/__init__.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/mem0/__init__.py#L38

Added line #L38 was not covered by tests

__all__ = [

Check warning on line 40 in agentops/instrumentation/mem0/__init__.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/mem0/__init__.py#L40

Added line #L40 was not covered by tests
"LIBRARY_NAME",
"LIBRARY_VERSION",
"Mem0Instrumentor",
# Memory operation wrappers
"mem0_add_wrapper",
"mem0_search_wrapper",
"mem0_get_all_wrapper",
"mem0_get_wrapper",
"mem0_delete_wrapper",
"mem0_update_wrapper",
"mem0_delete_all_wrapper",
"mem0_history_wrapper",
]
Loading
Loading