@@ -19,7 +19,7 @@ def test_logs_disabled_by_default(sentry_init, capture_envelopes):
1919
2020
2121def test_logs_basics (sentry_init , capture_envelopes ):
22- sentry_init (enable_sentry_logs = True )
22+ sentry_init (_experiments = { "enable_sentry_logs" : True } )
2323 envelopes = capture_envelopes ()
2424
2525 sentry_logger .trace ("This is a 'trace' log..." )
@@ -84,7 +84,7 @@ def test_logs_attributes(sentry_init, capture_envelopes):
8484 """
8585 Passing arbitrary attributes to log messages.
8686 """
87- sentry_init (enable_sentry_logs = True )
87+ sentry_init (_experiments = { "enable_sentry_logs" : True } )
8888 envelopes = capture_envelopes ()
8989
9090 attrs = {
@@ -112,7 +112,7 @@ def test_logs_message_params(sentry_init, capture_envelopes):
112112 """
113113 This is the official way of how to pass vars to log messages.
114114 """
115- sentry_init (enable_sentry_logs = True )
115+ sentry_init (_experiments = { "enable_sentry_logs" : True } )
116116 envelopes = capture_envelopes ()
117117
118118 sentry_logger .warn ("The recorded value was '{int_var}'" , int_var = 1 )
@@ -138,7 +138,7 @@ def test_logs_message_old_style(sentry_init, capture_envelopes):
138138 This is how vars are passed to strings in old Python projects.
139139 TODO: Should we support this?
140140 """
141- sentry_init (enable_sentry_logs = True )
141+ sentry_init (_experiments = { "enable_sentry_logs" : True } )
142142
143143 envelopes = capture_envelopes ()
144144
@@ -153,7 +153,7 @@ def test_logs_message_format(sentry_init, capture_envelopes):
153153 This is another popular way how vars are passed to strings in old Python projects.
154154 TODO: Should we support this?
155155 """
156- sentry_init (enable_sentry_logs = True )
156+ sentry_init (_experiments = { "enable_sentry_logs" : True } )
157157 envelopes = capture_envelopes ()
158158
159159 sentry_logger .warn ("The recorded value was '{int_var}'" .format (int_var = 1 ))
@@ -167,7 +167,7 @@ def test_logs_message_f_string(sentry_init, capture_envelopes):
167167 This is the preferred way how vars are passed to strings in newer Python projects.
168168 TODO: This we should definitely support.
169169 """
170- sentry_init (enable_sentry_logs = True )
170+ sentry_init (_experiments = { "enable_sentry_logs" : True } )
171171 envelopes = capture_envelopes ()
172172
173173 int_var = 1
@@ -182,7 +182,7 @@ def test_logs_message_python_logging(sentry_init, capture_envelopes):
182182 This is how vars are passed to log messages when using Python logging module.
183183 TODO: We probably should also support this, to make it easier to migrate from the old logging module to the Sentry one.
184184 """
185- sentry_init (enable_sentry_logs = True )
185+ sentry_init (_experiments = { "enable_sentry_logs" : True } )
186186 envelopes = capture_envelopes ()
187187
188188 try :
@@ -199,7 +199,7 @@ def test_logs_tied_to_transactions(sentry_init, capture_envelopes):
199199 """
200200 Log messages are also tied to transactions.
201201 """
202- sentry_init (enable_sentry_logs = True )
202+ sentry_init (_experiments = { "enable_sentry_logs" : True } )
203203 envelopes = capture_envelopes ()
204204
205205 with sentry_sdk .start_transaction (name = "test-transaction" ) as trx :
@@ -213,7 +213,7 @@ def test_logs_tied_to_spans(sentry_init, capture_envelopes):
213213 """
214214 Log messages are also tied to spans.
215215 """
216- sentry_init (enable_sentry_logs = True )
216+ sentry_init (_experiments = { "enable_sentry_logs" : True } )
217217 envelopes = capture_envelopes ()
218218
219219 with sentry_sdk .start_transaction (name = "test-transaction" ) as trx :
0 commit comments