Skip to content

Commit 40bbb7f

Browse files
authored
adds error reporting quickstart (GoogleCloudPlatform#299)
1 parent 028cc95 commit 40bbb7f

File tree

7 files changed

+2419
-0
lines changed

7 files changed

+2419
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Stackdriver Error Reporting
2+
3+
`quickstart.php` is a simple command-line program to demonstrate logging an
4+
exception to Stackdriver Error Reporting.
5+
6+
To use this sample, you must first [enable the Stackdriver Error Reporting API][0]
7+
8+
# Running locally
9+
10+
Use the [Cloud SDK](https://cloud.google.com/sdk) to provide authentication:
11+
12+
gcloud beta auth application-default login
13+
14+
Open `quickstart.php` in a text editor and replace the text `YOUR_PROJECT_ID`
15+
with your Project ID.
16+
17+
Run the samples:
18+
19+
```sh
20+
php quickstart.php
21+
Exception logged to Stack Driver Error Reporting
22+
```
23+
24+
View [Stackdriver Error Reporting][0] in the Cloud Console to see the logged
25+
exception.
26+
27+
[0]: https://console.cloud.google.com/flows/enableapi?apiid=clouderrorreporting.googleapis.com
28+
[1]: https://console.cloud.google.com/errors
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"require": {
3+
"google/cloud": "^0.20.1"
4+
},
5+
"require-dev": {
6+
"google/cloud-tools": "^0.6"
7+
}
8+
}

0 commit comments

Comments
 (0)