Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions docs/platforms/python/metrics/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ With Sentry Metrics, you can send counters, gauges and distributions from your a

<PlatformContent includePath="metrics/requirements" />

## Setup

<PlatformContent includePath="metrics/setup" />

## Usage

<PlatformContent includePath="metrics/usage" />
Expand Down
8 changes: 3 additions & 5 deletions platform-includes/metrics/options/python.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
```

Expand All @@ -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.
2 changes: 1 addition & 1 deletion platform-includes/metrics/requirements/python.mdx
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
10 changes: 0 additions & 10 deletions platform-includes/metrics/setup/python.mdx

This file was deleted.

Loading