You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MIGRATION_GUIDE.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,18 +20,18 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
20
20
- Redis integration: In Redis pipeline spans there is no `span["data"]["redis.commands"]` that contains a dict `{"count": 3, "first_ten": ["cmd1", "cmd2", ...]}` but instead `span["data"]["redis.commands.count"]` (containing `3`) and `span["data"]["redis.commands.first_ten"]` (containing `["cmd1", "cmd2", ...]`).
21
21
- clickhouse-driver integration: The query is now available under the `db.query.text` span attribute (only if `send_default_pii` is `True`).
22
22
-`sentry_sdk.init` now returns `None` instead of a context manager.
23
-
- The `sampling_context` argument of `traces_sampler` now additionally contains all span attributes known at span start.
24
-
- If you're using the Celery integration, the `sampling_context` argument of `traces_sampler` doesn't contain the `celery_job` dictionary anymore. Instead, the individual keys are now available as:
23
+
- The `sampling_context` argument of `traces_sampler`and `profiles_sampler`now additionally contains all span attributes known at span start.
24
+
- If you're using the Celery integration and a custom traces/profiles sampler, the `sampling_context` argument of `traces_sampler` and `profiles_sampler` doesn't contain the `celery_job` dictionary anymore. Instead, the individual keys are now available as:
25
25
26
-
| Dictionary keys | Sampling context key |
27
-
| ---------------------- | -------------------- |
28
-
|`celery_job["args"]`|`celery.job.args`|
29
-
|`celery_job["kwargs"]`|`celery.job.kwargs`|
30
-
|`celery_job["task"]`|`celery.job.task`|
26
+
| Dictionary keys | Sampling context key | Example |
Note that all of these are serialized, i.e., not the original `args` and `kwargs` but rather OpenTelemetry-friendly span attributes.
33
33
34
-
- If you're using the AIOHTTP integration, the `sampling_context` argument of `traces_sampler` doesn't contain the `aiohttp_request` object anymore. Instead, some of the individual properties of the request are accessible, if available, as follows:
34
+
- If you're using the AIOHTTP integration and a custom traces/profiles sampler, the `sampling_context` argument of `traces_sampler` and `profiles_sampler` doesn't contain the `aiohttp_request` object anymore. Instead, some of the individual properties of the request are accessible, if available, as follows:
@@ -42,7 +42,7 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
42
42
|`scheme`|`url.scheme`|
43
43
| full URL |`url.full`|
44
44
45
-
- If you're using the Tornado integration, the `sampling_context` argument of `traces_sampler` doesn't contain the `tornado_request` object anymore. Instead, some of the individual properties of the request are accessible, if available, as follows:
45
+
- If you're using the Tornado integration and a custom traces/profiles sampler, the `sampling_context` argument of `traces_sampler` and `profiles_sampler` doesn't contain the `tornado_request` object anymore. Instead, some of the individual properties of the request are accessible, if available, as follows:
- If you're using the generic WSGI integration, the `sampling_context` argument of `traces_sampler` doesn't contain the `wsgi_environ` object anymore. Instead, the individual properties of the environment are accessible, if available, as follows:
57
+
- If you're using the generic WSGI integration and a custom traces/profiles sampler, the `sampling_context` argument of `traces_sampler` and `profiles_sampler` doesn't contain the `wsgi_environ` object anymore. Instead, the individual properties of the environment are accessible, if available, as follows:
@@ -67,7 +67,7 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
67
67
|`wsgi.url_scheme`|`url.scheme`|
68
68
| full URL |`url.full`|
69
69
70
-
- If you're using the generic ASGI integration, the `sampling_context` argument of `traces_sampler` doesn't contain the `asgi_scope` object anymore. Instead, the individual properties of the scope, if available, are accessible as follows:
70
+
- If you're using the generic ASGI integration and a custom traces/profiles sampler, the `sampling_context` argument of `traces_sampler` and `profiles_sampler` doesn't contain the `asgi_scope` object anymore. Instead, the individual properties of the scope, if available, are accessible as follows:
@@ -81,19 +81,19 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
81
81
|`client`|`client.address`, `client.port`|
82
82
| full URL |`url.full`|
83
83
84
-
- If you're using the RQ integration, the `sampling_context` argument of `traces_sampler` doesn't contain the `rq_job` object anymore. Instead, the individual properties of the job and the queue, if available, are accessible as follows:
84
+
- If you're using the RQ integration and a custom traces/profiles sampler, the `sampling_context` argument of `traces_sampler` and `profiles_sampler` doesn't contain the `rq_job` object anymore. Instead, the individual properties of the job and the queue, if available, are accessible as follows:
Note that `rq.job.args`, `rq.job.kwargs`, and `rq.job.func` are serialized and not the actual objects on the job.
95
95
96
-
- If you're using the AWS Lambda integration, the `sampling_context` argument of `traces_sampler` doesn't contain the `aws_event` and `aws_context` objects anymore. Instead, the following, if available, is accessible:
96
+
- If you're using the AWS Lambda integration and a custom traces/profiles sampler, the `sampling_context` argument of `traces_sampler` and `profiles_sampler` doesn't contain the `aws_event` and `aws_context` objects anymore. Instead, the following, if available, is accessible:
@@ -105,7 +105,7 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
105
105
|`aws_event["headers"]["Host"]`|`server.address`|
106
106
|`aws_context["function_name"]`|`faas.name`|
107
107
108
-
- If you're using the GCP integration, the `sampling_context` argument of `traces_sampler` doesn't contain the `gcp_env` and `gcp_event` keys anymore. Instead, the following, if available, is accessible:
108
+
- If you're using the GCP integration and a custom traces/profiles sampler, the `sampling_context` argument of `traces_sampler` and `profiles_sampler` doesn't contain the `gcp_env` and `gcp_event` keys anymore. Instead, the following, if available, is accessible:
109
109
110
110
| Old sampling context key | New sampling context key |
0 commit comments