Skip to content

Commit 11b6307

Browse files
committed
fix: add APPMAP_INSTRUMENT_PROPERTIES
Add APPMAP_INSTRUMENT_PROPERTIES to control whether properties should be instrumented.
1 parent feec761 commit 11b6307

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

_appmap/importer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def is_member_func(m):
132132
if key.startswith("__"):
133133
continue
134134
static_value = inspect.getattr_static(cls, key)
135-
if isinstance(static_value, property):
135+
if Importer.instrument_properties and isinstance(static_value, property):
136136
properties[key] = (
137137
static_value,
138138
{
@@ -164,6 +164,9 @@ def initialize(cls):
164164
cls.filter_stack = []
165165
cls.filter_chain = []
166166
cls._skip_instrumenting = ("appmap", "_appmap")
167+
cls.instrument_properties = (
168+
Env.current.get("APPMAP_INSTRUMENT_PROPERTIES", "true").lower() == "true"
169+
)
167170

168171
@classmethod
169172
def use_filter(cls, filter_class):

0 commit comments

Comments
 (0)