diff --git a/docs/platforms/python/metrics/index.mdx b/docs/platforms/python/metrics/index.mdx index f363173e3ea51..eb28c28fb6d3e 100644 --- a/docs/platforms/python/metrics/index.mdx +++ b/docs/platforms/python/metrics/index.mdx @@ -17,10 +17,6 @@ With Sentry Metrics, you can send counters, gauges and distributions from your a -## Setup - - - ## Usage diff --git a/platform-includes/metrics/options/python.mdx b/platform-includes/metrics/options/python.mdx index c4b1065a903ce..bb6fd7b0b230a 100644 --- a/platform-includes/metrics/options/python.mdx +++ b/platform-includes/metrics/options/python.mdx @@ -16,10 +16,7 @@ def before_metric(metric: Metric, _hint: Hint) -> Optional[Metric]: sentry_sdk.init( dsn="___PUBLIC_DSN___", - _experiments={ - "enable_metrics": True, - "before_send_metric": before_metric, - }, + before_send_metric=before_metric, ) ``` @@ -30,7 +27,8 @@ The metric dict has the following keys: - `name`: (`str`) The name of the metric. - `type`: (`str` - one of `counter`, `gauge`, `distribution`) The type of metric. - `value`: (`float`) The numeric value of the metric. -- `unit`: (`int`) The unit of measurement for the metric value. +- `unit`: (`Optional[str]`) The unit of measurement for the metric value. - `attributes`: (`dict[str, str | bool | float | int]`) Additional attributes to be sent with the metric. - `timestamp`: (`float`) Timestamp in seconds (epoch time) indicating when the metric was recorded. - `trace_id`: (`Optional[str]`) The trace ID of the trace this metric belongs to. +- `span_id`: (`Optional[str]`) The span id of the span that was active when the metric was emitted. diff --git a/platform-includes/metrics/requirements/python.mdx b/platform-includes/metrics/requirements/python.mdx index 2761e66ebf0a0..d5a535c7dbd39 100644 --- a/platform-includes/metrics/requirements/python.mdx +++ b/platform-includes/metrics/requirements/python.mdx @@ -1,4 +1,4 @@ -Metrics for Python are supported in Sentry Python SDK version `2.43.0` and above. +Metrics for Python are supported in Sentry Python SDK version `2.44.0` and above. ```bash {tabTitle:pip} pip install "sentry-sdk" diff --git a/platform-includes/metrics/setup/python.mdx b/platform-includes/metrics/setup/python.mdx deleted file mode 100644 index 2f6c90d04b9a9..0000000000000 --- a/platform-includes/metrics/setup/python.mdx +++ /dev/null @@ -1,10 +0,0 @@ -To enable metrics, you need to initialize the SDK with the `enable_metrics` option set to `True`. - -```python -sentry_sdk.init( - dsn="___PUBLIC_DSN___", - _experiments={ - enable_metrics: True, - }, -) -```