Skip to content

Commit 8397b10

Browse files
committed
remove template
1 parent f26fc8c commit 8397b10

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

sentry_sdk/integrations/loguru.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,6 @@ def loguru_sentry_logs_handler(message):
195195
if record.get("name"):
196196
attrs["logger.name"] = record["name"]
197197

198-
if record["message"]:
199-
attrs["sentry.message.template"] = record["message"]
200-
201198
client._capture_experimental_log(
202199
{
203200
"severity_text": otel_severity_text,

tests/integrations/loguru/test_loguru.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ def test_sentry_logs_warning(
149149
logs = envelopes_to_logs(envelopes)
150150

151151
attrs = logs[0]["attributes"]
152-
# no access to pre-formatted message atm, so template is already filled in
153-
assert attrs["sentry.message.template"] == "this is just a template"
154152
assert "code.file.path" in attrs
155153
assert "code.line.number" in attrs
156154
assert attrs["logger.name"] == "tests.integrations.loguru.test_loguru"
@@ -299,11 +297,9 @@ def test_logging_errors(sentry_init, capture_envelopes, uninstall_integration, r
299297

300298
logs = envelopes_to_logs(envelopes)
301299
assert logs[0]["severity_text"] == "error"
302-
assert logs[0]["attributes"]["sentry.message.template"] == "test exc 1"
303300
assert "code.line.number" in logs[0]["attributes"]
304301

305302
assert logs[1]["severity_text"] == "error"
306-
assert logs[1]["attributes"]["sentry.message.template"] == "error is %s"
307303
assert "code.line.number" in logs[1]["attributes"]
308304

309305
assert len(logs) == 2
@@ -416,7 +412,6 @@ def test_logger_with_all_attributes(
416412
assert attributes == {
417413
"logger.name": "tests.integrations.loguru.test_loguru",
418414
"sentry.origin": "auto.logger.loguru",
419-
"sentry.message.template": "log #1",
420415
"sentry.environment": "production",
421416
"sentry.sdk.version": VERSION,
422417
"sentry.severity_number": 13,

0 commit comments

Comments
 (0)