Skip to content
Open
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
8 changes: 4 additions & 4 deletions platform-includes/metrics/usage/php.laravel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Metrics are enabled by default in the PHP SDK. After the SDK is initialized, you

The SDK buffers up to 1000 metric entries at a time. Once that limit is reached, it keeps only the most recent 1000. If you need to retain more than that, flush the metrics periodically before you exceed the buffer.

## Emit a Counter
### Emit a Counter

Counters are one of the more basic types of metrics and can be used to count certain event occurrences.

Expand All @@ -13,7 +13,7 @@ To emit a counter, do the following:
\Sentry\trace_metrics()->count('button-click', 5, ['browser' => 'Firefox', 'app_version' => '1.0.0']);
```

## Emit a Distribution
### Emit a Distribution

Distributions help you get the most insights from your data by allowing you to obtain aggregations such as `p90`, `min`, `max`, and `avg`.

Expand All @@ -26,7 +26,7 @@ use \Sentry\Metrics\Unit;
\Sentry\trace_metrics()->distribution('page-load', 15.0, ['page' => '/home'], Unit::millisecond());
```

## Emit a Gauge
### Emit a Gauge

Gauges let you obtain aggregates like `min`, `max`, `avg`, `sum`, and `count`. Gauges can not be used to represent percentiles. If percentiles aren't important to you, we recommend using gauges.

Expand All @@ -39,7 +39,7 @@ use \Sentry\Metrics\Unit;
\Sentry\trace_metrics()->gauge('page-load', 15.0, ['page' => '/home'], Unit::millisecond());
```

## Flush
### Flush

Metrics are flushed and sent to Sentry at the end of each request or command.

Expand Down
8 changes: 4 additions & 4 deletions platform-includes/metrics/usage/php.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Metrics are enabled by default in the PHP SDK. After the SDK is initialized, you

The SDK buffers up to 1000 metric entries at a time. Once that limit is reached, it keeps only the most recent 1000. If you need to retain more than that, flush the metrics periodically before you exceed the buffer.

## Emit a Counter
### Emit a Counter

Counters are one of the more basic types of metrics and can be used to count certain event occurrences.

Expand All @@ -13,7 +13,7 @@ To emit a counter, do the following:
\Sentry\trace_metrics()->count('button-click', 5, ['browser' => 'Firefox', 'app_version' => '1.0.0']);
```

## Emit a Distribution
### Emit a Distribution

Distributions help you get the most insights from your data by allowing you to obtain aggregations such as `p90`, `min`, `max`, and `avg`.

Expand All @@ -26,7 +26,7 @@ use \Sentry\Metrics\Unit;
\Sentry\trace_metrics()->distribution('page-load', 15.0, ['page' => '/home'], Unit::millisecond());
```

## Emit a Gauge
### Emit a Gauge

Gauges let you obtain aggregates like `min`, `max`, `avg`, `sum`, and `count`. Gauges can not be used to represent percentiles. If percentiles aren't important to you, we recommend using gauges.

Expand All @@ -39,7 +39,7 @@ use \Sentry\Metrics\Unit;
\Sentry\trace_metrics()->gauge('page-load', 15.0, ['page' => '/home'], Unit::millisecond());
```

## Flush
### Flush

Make sure to flush collected metrics at the end.

Expand Down
8 changes: 4 additions & 4 deletions platform-includes/metrics/usage/php.symfony.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Metrics are enabled by default in the Symfony SDK. After the SDK is initialized,

The SDK buffers up to 1000 metric entries at a time. Once that limit is reached, it keeps only the most recent 1000. If you need to retain more than that, flush the metrics periodically before you exceed the buffer.

## Emit a Counter
### Emit a Counter

Counters are one of the more basic types of metrics and can be used to count certain event occurrences.

Expand All @@ -13,7 +13,7 @@ To emit a counter, do the following:
\Sentry\trace_metrics()->count('button-click', 5, ['browser' => 'Firefox', 'app_version' => '1.0.0']);
```

## Emit a Distribution
### Emit a Distribution

Distributions help you get the most insights from your data by allowing you to obtain aggregations such as `p90`, `min`, `max`, and `avg`.

Expand All @@ -26,7 +26,7 @@ use \Sentry\Metrics\Unit;
\Sentry\trace_metrics()->distribution('page-load', 15.0, ['page' => '/home'], Unit::millisecond());
```

## Emit a Gauge
### Emit a Gauge

Gauges let you obtain aggregates like `min`, `max`, `avg`, `sum`, and `count`. Gauges can not be used to represent percentiles. If percentiles aren't important to you, we recommend using gauges.

Expand All @@ -39,7 +39,7 @@ use \Sentry\Metrics\Unit;
\Sentry\trace_metrics()->gauge('page-load', 15.0, ['page' => '/home'], Unit::millisecond());
```

## Flush
### Flush

Metrics are flushed and sent to Sentry at the end of each request or command.

Expand Down
6 changes: 3 additions & 3 deletions platform-includes/metrics/usage/python.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Metrics are enabled by default. Once you initialize the SDK, you can send metric

The `metrics` namespace exposes three methods that you can use to capture different types of metric information: `count`, `gauge`, and `distribution`.

## Emit a Counter
### Emit a Counter

Counters are one of the more basic types of metrics and can be used to count certain event occurrences.

Expand All @@ -22,7 +22,7 @@ sentry_sdk.metrics.count(
)
```

## Emit a Distribution
### Emit a Distribution

Distributions help you get the most insights from your data by allowing you to obtain aggregations such as `p90`, `min`, `max`, and `avg`.

Expand All @@ -42,7 +42,7 @@ sentry_sdk.metrics.distribution(
)
```

## Emit a Gauge
### Emit a Gauge

Gauges let you obtain aggregates like `min`, `max`, `avg`, `sum`, and `count`. They can be represented in a more space-efficient way than distributions, but they can't be used to get percentiles. If percentiles aren't important to you, we recommend using gauges.

Expand Down
6 changes: 3 additions & 3 deletions platform-includes/metrics/usage/ruby.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Metrics are enabled by default. Once you initialize the SDK, you can send metric

The `metrics` namespace exposes three methods that you can use to capture different types of metric information: `count`, `gauge`, and `distribution`.

## Emit a Counter
### Emit a Counter

Counters are one of the more basic types of metrics and can be used to count certain event occurrences.

Expand All @@ -17,7 +17,7 @@ Sentry.metrics.count(
)
```

## Emit a Distribution
### Emit a Distribution

Distributions help you get the most insights from your data by allowing you to obtain aggregations such as `p90`, `min`, `max`, and `avg`.

Expand All @@ -33,7 +33,7 @@ Sentry.metrics.distribution(
)
```

## Emit a Gauge
### Emit a Gauge

Gauges let you obtain aggregates like `min`, `max`, `avg`, `sum`, and `count`. They can be represented in a more space-efficient way than distributions, but they can't be used to get percentiles. If percentiles aren't important to you, we recommend using gauges.

Expand Down