|
1 | 1 | /*
|
2 |
| -Package sentry is the official Sentry SDK for Go. |
| 2 | +Package repository: https://github.com/getsentry/sentry-go/ |
3 | 3 |
|
4 |
| -Use it to report errors and track application performance through distributed |
5 |
| -tracing. |
6 |
| -
|
7 |
| -For more information about Sentry and SDK features please have a look at the |
8 |
| -documentation site https://docs.sentry.io/platforms/go/. |
9 |
| -
|
10 |
| -# Basic Usage |
11 |
| -
|
12 |
| -The first step is to initialize the SDK, providing at a minimum the DSN of your |
13 |
| -Sentry project. This step is accomplished through a call to sentry.Init. |
14 |
| -
|
15 |
| - func main() { |
16 |
| - err := sentry.Init(...) |
17 |
| - ... |
18 |
| - } |
19 |
| -
|
20 |
| -A more detailed yet simple example is available at |
21 |
| -https://github.com/getsentry/sentry-go/blob/master/_examples/basic/main.go. |
22 |
| -
|
23 |
| -# Error Reporting |
24 |
| -
|
25 |
| -The Capture* functions report messages and errors to Sentry. |
26 |
| -
|
27 |
| - sentry.CaptureMessage(...) |
28 |
| - sentry.CaptureException(...) |
29 |
| - sentry.CaptureEvent(...) |
30 |
| -
|
31 |
| -Use similarly named functions in the Hub for concurrent programs like web |
32 |
| -servers. |
33 |
| -
|
34 |
| -# Performance Monitoring |
35 |
| -
|
36 |
| -You can use Sentry to monitor your application's performance. More information |
37 |
| -on the product page https://docs.sentry.io/product/performance/. |
38 |
| -
|
39 |
| -The StartSpan function creates new spans. |
40 |
| -
|
41 |
| - span := sentry.StartSpan(ctx, "operation") |
42 |
| - ... |
43 |
| - span.Finish() |
44 |
| -
|
45 |
| -# Integrations |
46 |
| -
|
47 |
| -The SDK has support for several Go frameworks, available as subpackages. |
48 |
| -
|
49 |
| -# Getting Support |
50 |
| -
|
51 |
| -For paid Sentry.io accounts, head out to https://sentry.io/support. |
52 |
| -
|
53 |
| -For all users, support channels include: |
54 |
| -
|
55 |
| - Forum: https://forum.sentry.io |
56 |
| - Discord: https://discord.gg/Ww9hbqr (#go channel) |
57 |
| -
|
58 |
| -If you found an issue with the SDK, please report through |
59 |
| -https://github.com/getsentry/sentry-go/issues/new/choose. |
60 |
| -
|
61 |
| -For responsibly disclosing a security issue, please follow the steps in |
62 |
| -https://sentry.io/security/#vulnerability-disclosure. |
| 4 | +For more information about Sentry and SDK features, please have a look at the official documentation site: https://docs.sentry.io/platforms/go/ |
63 | 5 | */
|
64 | 6 | package sentry
|
0 commit comments