Skip to content

Commit

Permalink
Merge pull request #673 from stripe/ob-enable-telemetry
Browse files Browse the repository at this point in the history
Enable request latency telemetry by default
  • Loading branch information
ob-stripe authored Jun 25, 2019
2 parents 8588b74 + ae2f99a commit 0f730d8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
[![License](https://poser.pugx.org/stripe/stripe-php/license.svg)](https://packagist.org/packages/stripe/stripe-php)
[![Code Coverage](https://coveralls.io/repos/stripe/stripe-php/badge.svg?branch=master)](https://coveralls.io/r/stripe/stripe-php?branch=master)

You can sign up for a Stripe account at https://stripe.com.
The Stripe PHP library provides convenient access to the Stripe API from
applications written in the PHP language. It includes a pre-defined set of
classes for API resources that initialize themselves dynamically from API
responses which makes it compatible with a wide range of versions of the Stripe
API.

## Requirements

Expand Down Expand Up @@ -56,7 +60,7 @@ echo $charge;

## Documentation

Please see https://stripe.com/docs/api for up-to-date documentation.
See the [PHP API docs](https://stripe.com/docs/api/php#intro).

## Legacy Version Support

Expand Down Expand Up @@ -179,6 +183,17 @@ an intermittent network problem:
[Idempotency keys][idempotency-keys] are added to requests to guarantee that
retries are safe.

### Request latency telemetry

By default, the library sends request latency telemetry to Stripe. These
numbers help Stripe improve the overall latency of its API for all users.

You can disable this behavior if you prefer:

```php
\Stripe\Stripe::setEnableTelemetry(false);
```

## Development

Get [Composer][composer]. For example, on Mac OS:
Expand Down
2 changes: 1 addition & 1 deletion lib/Stripe.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Stripe
public static $maxNetworkRetries = 0;

// @var boolean Whether client telemetry is enabled. Defaults to false.
public static $enableTelemetry = false;
public static $enableTelemetry = true;

// @var float Maximum delay between retries, in seconds
private static $maxNetworkRetryDelay = 2.0;
Expand Down

0 comments on commit 0f730d8

Please sign in to comment.