Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3557347

Browse files
committedDec 6, 2024
Merge branch 'potel-base' into potel-base-run-all-tests
2 parents 18ec5cc + fdb5cdc commit 3557347

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+732
-276
lines changed
 

‎CHANGELOG.md

+25
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# Changelog
22

3+
## 2.19.2
4+
5+
### Various fixes & improvements
6+
7+
- Deepcopy and ensure get_all function always terminates (#3861) by @cmanallen
8+
- Cleanup chalice test environment (#3858) by @antonpirker
9+
10+
## 2.19.1
11+
12+
### Various fixes & improvements
13+
14+
- Fix errors when instrumenting Django cache (#3855) by @BYK
15+
- Copy `scope.client` reference as well (#3857) by @sl0thentr0py
16+
- Don't give up on Spotlight on 3 errors (#3856) by @BYK
17+
- Add missing stack frames (#3673) by @antonpirker
18+
- Fix wrong metadata type in async gRPC interceptor (#3205) by @fdellekart
19+
- Rename launch darkly hook to match JS SDK (#3743) by @aliu39
20+
- Script for checking if our instrumented libs are Python 3.13 compatible (#3425) by @antonpirker
21+
- Improve Ray tests (#3846) by @antonpirker
22+
- Test with Celery `5.5.0rc3` (#3842) by @sentrivana
23+
- Fix asyncio testing setup (#3832) by @sl0thentr0py
24+
- Bump `codecov/codecov-action` from `5.0.2` to `5.0.7` (#3821) by @dependabot
25+
- Fix CI (#3834) by @sentrivana
26+
- Use new ClickHouse GH action (#3826) by @antonpirker
27+
328
## 2.19.0
429

530
### Various fixes & improvements

‎MIGRATION_GUIDE.md

+104-96
Original file line numberDiff line numberDiff line change
@@ -20,102 +20,109 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
2020
- 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", ...]`).
2121
- clickhouse-driver integration: The query is now available under the `db.query.text` span attribute (only if `send_default_pii` is `True`).
2222
- `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:
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` |
31-
32-
Note that all of these are serialized, i.e., not the original `args` and `kwargs` but rather OpenTelemetry-friendly span attributes.
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:
35-
36-
| Request property | Sampling context key(s) |
37-
| ---------------- | ------------------------------- |
38-
| `path` | `url.path` |
39-
| `query_string` | `url.query` |
40-
| `method` | `http.request.method` |
41-
| `host` | `server.address`, `server.port` |
42-
| `scheme` | `url.scheme` |
43-
| full URL | `url.full` |
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:
46-
47-
| Request property | Sampling context key(s) |
48-
| ---------------- | --------------------------------------------------- |
49-
| `path` | `url.path` |
50-
| `query` | `url.query` |
51-
| `protocol` | `url.scheme` |
52-
| `method` | `http.request.method` |
53-
| `host` | `server.address`, `server.port` |
54-
| `version` | `network.protocol.name`, `network.protocol.version` |
55-
| full URL | `url.full` |
56-
57-
- 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:
58-
59-
| Env property | Sampling context key(s) |
60-
| ----------------- | ------------------------------------------------- |
61-
| `PATH_INFO` | `url.path` |
62-
| `QUERY_STRING` | `url.query` |
63-
| `REQUEST_METHOD` | `http.request.method` |
64-
| `SERVER_NAME` | `server.address` |
65-
| `SERVER_PORT` | `server.port` |
66-
| `SERVER_PROTOCOL` | `server.protocol.name`, `server.protocol.version` |
67-
| `wsgi.url_scheme` | `url.scheme` |
68-
| full URL | `url.full` |
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:
71-
72-
| Scope property | Sampling context key(s) |
73-
| -------------- | ------------------------------- |
74-
| `type` | `network.protocol.name` |
75-
| `scheme` | `url.scheme` |
76-
| `path` | `url.path` |
77-
| `query` | `url.query` |
78-
| `http_version` | `network.protocol.version` |
79-
| `method` | `http.request.method` |
80-
| `server` | `server.address`, `server.port` |
81-
| `client` | `client.address`, `client.port` |
82-
| full URL | `url.full` |
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:
85-
86-
| RQ property | Sampling context key(s) |
87-
| --------------- | ---------------------------- |
88-
| `rq_job.args` | `rq.job.args` |
89-
| `rq_job.kwargs` | `rq.job.kwargs` |
90-
| `rq_job.func` | `rq.job.func` |
91-
| `queue.name` | `messaging.destination.name` |
92-
| `rq_job.id` | `messaging.message.id` |
93-
94-
Note that `rq.job.args`, `rq.job.kwargs`, and `rq.job.func` are serialized and not the actual objects on the job.
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:
97-
98-
| AWS property | Sampling context key(s) |
99-
| ------------------------------------------- | ----------------------- |
100-
| `aws_event["httpMethod"]` | `http.request.method` |
101-
| `aws_event["queryStringParameters"]` | `url.query` |
102-
| `aws_event["path"]` | `url.path` |
103-
| full URL | `url.full` |
104-
| `aws_event["headers"]["X-Forwarded-Proto"]` | `network.protocol.name` |
105-
| `aws_event["headers"]["Host"]` | `server.address` |
106-
| `aws_context["function_name"]` | `faas.name` |
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:
109-
110-
| Old sampling context key | New sampling context key |
111-
| --------------------------------- | -------------------------- |
112-
| `gcp_env["function_name"]` | `faas.name` |
113-
| `gcp_env["function_region"]` | `faas.region` |
114-
| `gcp_env["function_project"]` | `gcp.function.project` |
115-
| `gcp_env["function_identity"]` | `gcp.function.identity` |
116-
| `gcp_env["function_entry_point"]` | `gcp.function.entry_point` |
117-
| `gcp_event.method` | `http.request.method` |
118-
| `gcp_event.query_string` | `url.query` |
23+
- The `sampling_context` argument of `traces_sampler` and `profiles_sampler` now additionally contains all span attributes known at span start.
24+
- The integration-specific content of the `sampling_context` argument of `traces_sampler` and `profiles_sampler` now looks different.
25+
- The Celery integration doesn't add the `celery_job` dictionary anymore. Instead, the individual keys are now available as:
26+
27+
| Dictionary keys | Sampling context key | Example |
28+
| ---------------------- | --------------------------- | ------------------------------ |
29+
| `celery_job["args"]` | `celery.job.args.{index}` | `celery.job.args.0` |
30+
| `celery_job["kwargs"]` | `celery.job.kwargs.{kwarg}` | `celery.job.kwargs.kwarg_name` |
31+
| `celery_job["task"]` | `celery.job.task` | |
32+
33+
Note that all of these are serialized, i.e., not the original `args` and `kwargs` but rather OpenTelemetry-friendly span attributes.
34+
35+
- The AIOHTTP integration doesn't add the `aiohttp_request` object anymore. Instead, some of the individual properties of the request are accessible, if available, as follows:
36+
37+
| Request property | Sampling context key(s) |
38+
| ----------------- | ------------------------------- |
39+
| `path` | `url.path` |
40+
| `query_string` | `url.query` |
41+
| `method` | `http.request.method` |
42+
| `host` | `server.address`, `server.port` |
43+
| `scheme` | `url.scheme` |
44+
| full URL | `url.full` |
45+
| `request.headers` | `http.request.header.{header}` |
46+
47+
- The Tornado integration doesn't add the `tornado_request` object anymore. Instead, some of the individual properties of the request are accessible, if available, as follows:
48+
49+
| Request property | Sampling context key(s) |
50+
| ----------------- | --------------------------------------------------- |
51+
| `path` | `url.path` |
52+
| `query` | `url.query` |
53+
| `protocol` | `url.scheme` |
54+
| `method` | `http.request.method` |
55+
| `host` | `server.address`, `server.port` |
56+
| `version` | `network.protocol.name`, `network.protocol.version` |
57+
| full URL | `url.full` |
58+
| `request.headers` | `http.request.header.{header}` |
59+
60+
- The WSGI integration doesn't add the `wsgi_environ` object anymore. Instead, the individual properties of the environment are accessible, if available, as follows:
61+
62+
| Env property | Sampling context key(s) |
63+
| ----------------- | ------------------------------------------------- |
64+
| `PATH_INFO` | `url.path` |
65+
| `QUERY_STRING` | `url.query` |
66+
| `REQUEST_METHOD` | `http.request.method` |
67+
| `SERVER_NAME` | `server.address` |
68+
| `SERVER_PORT` | `server.port` |
69+
| `SERVER_PROTOCOL` | `server.protocol.name`, `server.protocol.version` |
70+
| `wsgi.url_scheme` | `url.scheme` |
71+
| full URL | `url.full` |
72+
| `HTTP_*` | `http.request.header.{header}` |
73+
74+
- The ASGI integration doesn't add the `asgi_scope` object anymore. Instead, the individual properties of the scope, if available, are accessible as follows:
75+
76+
| Scope property | Sampling context key(s) |
77+
| -------------- | ------------------------------- |
78+
| `type` | `network.protocol.name` |
79+
| `scheme` | `url.scheme` |
80+
| `path` | `url.path` |
81+
| `query` | `url.query` |
82+
| `http_version` | `network.protocol.version` |
83+
| `method` | `http.request.method` |
84+
| `server` | `server.address`, `server.port` |
85+
| `client` | `client.address`, `client.port` |
86+
| full URL | `url.full` |
87+
| `headers` | `http.request.header.{header}` |
88+
89+
-The RQ integration doesn't add the `rq_job` object anymore. Instead, the individual properties of the job and the queue, if available, are accessible as follows:
90+
91+
| RQ property | Sampling context key | Example |
92+
| --------------- | ---------------------------- | ---------------------- |
93+
| `rq_job.args` | `rq.job.args.{index}` | `rq.job.args.0` |
94+
| `rq_job.kwargs` | `rq.job.kwargs.{kwarg}` | `rq.job.args.my_kwarg` |
95+
| `rq_job.func` | `rq.job.func` | |
96+
| `queue.name` | `messaging.destination.name` | |
97+
| `rq_job.id` | `messaging.message.id` | |
98+
99+
Note that `rq.job.args`, `rq.job.kwargs`, and `rq.job.func` are serialized and not the actual objects on the job.
100+
101+
- The AWS Lambda integration doesn't add the `aws_event` and `aws_context` objects anymore. Instead, the following, if available, is accessible:
102+
103+
| AWS property | Sampling context key(s) |
104+
| ------------------------------------------- | ------------------------------- |
105+
| `aws_event["httpMethod"]` | `http.request.method` |
106+
| `aws_event["queryStringParameters"]` | `url.query` |
107+
| `aws_event["path"]` | `url.path` |
108+
| full URL | `url.full` |
109+
| `aws_event["headers"]["X-Forwarded-Proto"]` | `network.protocol.name` |
110+
| `aws_event["headers"]["Host"]` | `server.address` |
111+
| `aws_context["function_name"]` | `faas.name` |
112+
| `aws_event["headers"]` | `http.request.headers.{header}` |
113+
114+
- The GCP integration doesn't add the `gcp_env` and `gcp_event` keys anymore. Instead, the following, if available, is accessible:
115+
116+
| Old sampling context key | New sampling context key |
117+
| --------------------------------- | ------------------------------ |
118+
| `gcp_env["function_name"]` | `faas.name` |
119+
| `gcp_env["function_region"]` | `faas.region` |
120+
| `gcp_env["function_project"]` | `gcp.function.project` |
121+
| `gcp_env["function_identity"]` | `gcp.function.identity` |
122+
| `gcp_env["function_entry_point"]` | `gcp.function.entry_point` |
123+
| `gcp_event.method` | `http.request.method` |
124+
| `gcp_event.query_string` | `url.query` |
125+
| `gcp_event.headers` | `http.request.header.{header}` |
119126

120127

121128
### Removed
@@ -138,6 +145,7 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
138145
- `span.containing_transaction` has been removed. Use `span.root_span` instead.
139146
- `continue_from_headers`, `continue_from_environ` and `from_traceparent` have been removed, please use top-level API `sentry_sdk.continue_trace` instead.
140147
- `PropagationContext` constructor no longer takes a `dynamic_sampling_context` but takes a `baggage` object instead.
148+
- `ThreadingIntegration` no longer takes the `propagate_hub` argument.
141149

142150
### Deprecated
143151

0 commit comments

Comments
 (0)
Please sign in to comment.