Skip to content

Commit 3da2d3b

Browse files
authored
Expand scrubbing whitelist, especially for gen_ai messages (#1392)
1 parent 1ec6ed2 commit 3da2d3b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

logfire/_internal/scrubbing.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ class BaseScrubber(ABC):
127127
'exception.stacktrace',
128128
'exception.type',
129129
'exception.message',
130+
'error.type',
130131
'http.method',
131132
'http.status_code',
132133
'http.scheme',
@@ -135,6 +136,8 @@ class BaseScrubber(ABC):
135136
'http.route',
136137
'db.statement',
137138
'db.plan',
139+
'fastapi.route.name',
140+
'fastapi.route.operation_id',
138141
# Newer semantic conventions
139142
'url.full',
140143
'url.path',
@@ -143,6 +146,15 @@ class BaseScrubber(ABC):
143146
'agent_session_id',
144147
'do_not_scrub',
145148
'binary_content',
149+
'gen_ai.input.messages',
150+
'gen_ai.output.messages',
151+
'gen_ai.system_instructions',
152+
'pydantic_ai.all_messages',
153+
'gen_ai.tool.name',
154+
'gen_ai.tool.call.id',
155+
'rpc.method',
156+
'gen_ai.system',
157+
'model_request_parameters',
146158
}
147159

148160
@abstractmethod

0 commit comments

Comments
 (0)