Skip to content

Commit 659e134

Browse files
ref(sdk): Update sentry sdk to 2.43.0 (#102383)
Bump `sentry-sdk` to version 2.43.0. Use `sentry_sdk.metrics` instead of `sentry_sdk._metrics` as the namespace was moved. --------- Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
1 parent 6b161e9 commit 659e134

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ dependencies = [
8585
"sentry-protos>=0.4.2",
8686
"sentry-redis-tools>=0.5.0",
8787
"sentry-relay>=0.9.17",
88-
"sentry-sdk[http2]>=2.42.0",
88+
"sentry-sdk[http2]>=2.43.0",
8989
"sentry-usage-accountant>=0.0.10",
9090
# remove once there are no unmarked transitive dependencies on setuptools
9191
"setuptools>=70.0.0",

src/sentry/metrics/sentry_sdk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from random import random
22
from typing import Any
33

4-
from sentry_sdk import _metrics as metrics
4+
from sentry_sdk import metrics
55

66
from .base import MetricsBackend, Tags
77

tests/sentry/metrics/test_dualwrite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_dualwrite_distribution(distribution, timing):
3535
distribution.assert_not_called()
3636

3737

38-
@mock.patch("sentry_sdk._metrics.count")
38+
@mock.patch("sentry_sdk.metrics.count")
3939
@mock.patch("datadog.dogstatsd.base.DogStatsd.increment")
4040
@thread_leak_allowlist(reason="datadog dualwrite metrics", issue=98803)
4141
def test_dualwrite_experimental_backend(dogstatsd_incr, sentry_sdk_incr):
@@ -57,7 +57,7 @@ def test_dualwrite_experimental_backend(dogstatsd_incr, sentry_sdk_incr):
5757
sentry_sdk_incr.assert_not_called()
5858

5959

60-
@mock.patch("sentry_sdk._metrics.gauge")
60+
@mock.patch("sentry_sdk.metrics.gauge")
6161
@mock.patch("datadog.dogstatsd.base.DogStatsd.gauge")
6262
@thread_leak_allowlist(reason="datadog dualwrite metrics", issue=98803)
6363
def test_dualwrite_experimental_backend_rollout_disabled(dogstatsd_gauge, sentry_sdk_gauge):

tests/sentry/metrics/test_sentry_sdk.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class TestSentrySDKMetricsBackend:
1010
def backend(self):
1111
return SentrySDKMetricsBackend(prefix="test.", experimental_sample_rate=1.0)
1212

13-
@mock.patch("sentry_sdk._metrics.count")
13+
@mock.patch("sentry_sdk.metrics.count")
1414
def test_incr(self, mock_count, backend):
1515
with mock.patch.object(backend, "_should_send", return_value=True):
1616
backend.incr("foo", tags={"x": "y"}, amount=2, unit="count")
@@ -22,7 +22,7 @@ def test_incr(self, mock_count, backend):
2222
attributes={"x": "y"},
2323
)
2424

25-
@mock.patch("sentry_sdk._metrics.count")
25+
@mock.patch("sentry_sdk.metrics.count")
2626
def test_incr_no_unit(self, mock_count, backend):
2727
with mock.patch.object(backend, "_should_send", return_value=True):
2828
backend.incr("foo", tags={"x": "y"}, amount=2)
@@ -34,7 +34,7 @@ def test_incr_no_unit(self, mock_count, backend):
3434
attributes={"x": "y"},
3535
)
3636

37-
@mock.patch("sentry_sdk._metrics.gauge")
37+
@mock.patch("sentry_sdk.metrics.gauge")
3838
def test_gauge(self, mock_gauge, backend):
3939
with mock.patch.object(backend, "_should_send", return_value=True):
4040
backend.gauge("bar", value=42.0, tags={"x": "y"}, unit="bytes")
@@ -46,7 +46,7 @@ def test_gauge(self, mock_gauge, backend):
4646
attributes={"x": "y"},
4747
)
4848

49-
@mock.patch("sentry_sdk._metrics.distribution")
49+
@mock.patch("sentry_sdk.metrics.distribution")
5050
def test_distribution(self, mock_distribution, backend):
5151
with mock.patch.object(backend, "_should_send", return_value=True):
5252
backend.distribution("baz", value=100.0, tags={"x": "y"}, unit="millisecond")
@@ -58,7 +58,7 @@ def test_distribution(self, mock_distribution, backend):
5858
attributes={"x": "y"},
5959
)
6060

61-
@mock.patch("sentry_sdk._metrics.count")
61+
@mock.patch("sentry_sdk.metrics.count")
6262
def test_incr_with_instance(self, mock_count, backend):
6363
with mock.patch.object(backend, "_should_send", return_value=True):
6464
backend.incr("foo", instance="web", tags={"x": "y"}, amount=1)
@@ -76,13 +76,13 @@ def test_timing_noop(self, backend):
7676
def test_event_noop(self, backend):
7777
backend.event("title", "message")
7878

79-
@mock.patch("sentry_sdk._metrics.count")
79+
@mock.patch("sentry_sdk.metrics.count")
8080
def test_incr_sampling(self, mock_count):
8181
backend = SentrySDKMetricsBackend(prefix="test.", experimental_sample_rate=0.0)
8282
backend.incr("foo", amount=1)
8383
mock_count.assert_not_called()
8484

85-
@mock.patch("sentry_sdk._metrics.count")
85+
@mock.patch("sentry_sdk.metrics.count")
8686
def test_incr_deny_list(self, mock_count):
8787
backend = SentrySDKMetricsBackend(
8888
prefix="test.", experimental_sample_rate=1.0, deny_list=["test.denied"]

uv.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)