File tree Expand file tree Collapse file tree 2 files changed +19
-19
lines changed
Expand file tree Collapse file tree 2 files changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -17,24 +17,6 @@ class LogBatcher(Batcher):
1717 TYPE = "log"
1818 CONTENT_TYPE = "application/vnd.sentry.items.log+json"
1919
20- def _record_lost (self , item : "Log" ) -> None :
21- # Construct log envelope item without sending it to report lost bytes
22- log_item = Item (
23- type = self .TYPE ,
24- content_type = self .CONTENT_TYPE ,
25- headers = {
26- "item_count" : 1 ,
27- },
28- payload = PayloadRef (json = {"items" : [self ._to_transport_format (item )]}),
29- )
30-
31- self ._record_lost_func (
32- reason = "queue_overflow" ,
33- data_category = "log_item" ,
34- item = log_item ,
35- quantity = 1 ,
36- )
37-
3820 @staticmethod
3921 def _to_transport_format (item : "Log" ) -> "Any" :
4022 if "sentry.severity_number" not in item ["attributes" ]:
@@ -54,3 +36,21 @@ def _to_transport_format(item: "Log") -> "Any":
5436 }
5537
5638 return res
39+
40+ def _record_lost (self , item : "Log" ) -> None :
41+ # Construct log envelope item without sending it to report lost bytes
42+ log_item = Item (
43+ type = self .TYPE ,
44+ content_type = self .CONTENT_TYPE ,
45+ headers = {
46+ "item_count" : 1 ,
47+ },
48+ payload = PayloadRef (json = {"items" : [self ._to_transport_format (item )]}),
49+ )
50+
51+ self ._record_lost_func (
52+ reason = "queue_overflow" ,
53+ data_category = "log_item" ,
54+ item = log_item ,
55+ quantity = 1 ,
56+ )
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ def _to_transport_format(metric: "Metric") -> "Any":
3838
3939 return res
4040
41- def _report_lost (self ):
41+ def _record_lost (self ):
4242 self ._record_lost_func (
4343 reason = "queue_overflow" ,
4444 data_category = "trace_metric" ,
You can’t perform that action at this time.
0 commit comments