• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/H21-May-2021-317270

echo/H21-May-2021-217167

example/H21-May-2021-1,319934

fasthttp/H21-May-2021-501405

gin/H21-May-2021-226176

http/H21-May-2021-519399

internal/H21-May-2021-879726

iris/H21-May-2021-206156

martini/H21-May-2021-192147

negroni/H21-May-2021-246184

scripts/H21-May-2021-2519

testdata/H21-May-2021-170161

.craft.ymlH A D21-May-2021363 1918

.gitattributesH A D21-May-2021248 65

.gitignoreH A D21-May-202191 65

.golangci.ymlH A D21-May-2021821 5251

CHANGELOG.mdH A D21-May-202114 KiB308248

CONTRIBUTING.mdH A D21-May-20212.7 KiB9764

LICENSEH A D21-May-20211.3 KiB106

MIGRATION.mdH A D21-May-20216.2 KiB393289

README.mdH A D21-May-20215 KiB11180

client.goH A D21-May-202119.5 KiB631382

client_test.goH A D21-May-202112.2 KiB521460

doc.goH A D21-May-20211.7 KiB641

dsn.goH A D21-May-20214.5 KiB204156

dsn_test.goH A D21-May-20215.7 KiB194170

errors_test.goH A D21-May-2021791 3827

example_transportwithhooks_test.goH A D21-May-20211.7 KiB6652

go.modH A D21-May-20211.4 KiB3532

go.sumH A D21-May-202124 KiB257256

helpers_test.goH A D21-May-20211.2 KiB5341

hub.goH A D21-May-202110.4 KiB383234

hub_test.goH A D21-May-20219.9 KiB385304

integrations.goH A D21-May-20217.3 KiB293220

integrations_test.goH A D21-May-20218 KiB391354

interfaces.goH A D21-May-202110.8 KiB316197

interfaces_test.goH A D21-May-20214.4 KiB181165

marshal_test.goH A D21-May-20214.4 KiB205187

mocks_test.goH A D21-May-2021835 4538

scope.goH A D21-May-202110.7 KiB434291

scope_concurrency_test.goH A D21-May-20211.2 KiB6654

scope_test.goH A D21-May-202119.6 KiB641519

sentry.goH A D21-May-20213.4 KiB13176

sourcereader.goH A D21-May-20211.2 KiB7151

sourcereader_test.goH A D21-May-20213.4 KiB129106

span_recorder.goH A D21-May-20211.5 KiB5839

stacktrace.goH A D21-May-20219.2 KiB331210

stacktrace_external_test.goH A D21-May-20217.4 KiB293193

stacktrace_test.goH A D21-May-20214.2 KiB172153

traces_sampler.goH A D21-May-20215.6 KiB17228

traces_sampler_test.goH A D21-May-20211.3 KiB6051

tracing.goH A D21-May-202117.7 KiB596352

tracing_test.goH A D21-May-202110 KiB395333

transport.goH A D21-May-202114.6 KiB568396

transport_test.goH A D21-May-202113.3 KiB517395

util.goH A D21-May-2021977 4029

util_test.goH A D21-May-2021659 3023

README.md

1<p align="center">
2  <a href="https://sentry.io" target="_blank" align="center">
3    <img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280">
4  </a>
5  <br />
6</p>
7
8# Official Sentry SDK for Go
9
10[![Build Status](https://github.com/getsentry/sentry-go/workflows/go-workflow/badge.svg)](https://github.com/getsentry/sentry-go/actions?query=workflow%3Ago-workflow)
11[![Go Report Card](https://goreportcard.com/badge/github.com/getsentry/sentry-go)](https://goreportcard.com/report/github.com/getsentry/sentry-go)
12[![Discord](https://img.shields.io/discord/621778831602221064)](https://discord.gg/Ww9hbqr)
13[![GoDoc](https://godoc.org/github.com/getsentry/sentry-go?status.svg)](https://godoc.org/github.com/getsentry/sentry-go)
14[![go.dev](https://img.shields.io/badge/go.dev-pkg-007d9c.svg?style=flat)](https://pkg.go.dev/github.com/getsentry/sentry-go)
15
16`sentry-go` provides a Sentry client implementation for the Go programming
17language. This is the next line of the Go SDK for [Sentry](https://sentry.io/),
18intended to replace the `raven-go` package.
19
20> Looking for the old `raven-go` SDK documentation? See the Legacy client section [here](https://docs.sentry.io/clients/go/).
21> If you want to start using sentry-go instead, check out the [migration guide](https://docs.sentry.io/platforms/go/migration/).
22
23## Requirements
24
25The only requirement is a Go compiler.
26
27We verify this package against the 3 most recent releases of Go. Those are the
28supported versions. The exact versions are defined in
29[`GitHub workflow`](.github/workflows/ci.yml).
30
31In addition, we run tests against the current master branch of the Go toolchain,
32though support for this configuration is best-effort.
33
34## Installation
35
36`sentry-go` can be installed like any other Go library through `go get`:
37
38```console
39$ go get github.com/getsentry/sentry-go
40```
41
42Or, if you are already using
43[Go Modules](https://github.com/golang/go/wiki/Modules), you may specify a
44version number as well:
45
46```console
47$ go get github.com/getsentry/sentry-go@latest
48```
49
50Check out the [list of released versions](https://pkg.go.dev/github.com/getsentry/sentry-go?tab=versions).
51
52## Configuration
53
54To use `sentry-go`, you’ll need to import the `sentry-go` package and initialize
55it with your DSN and other [options](https://pkg.go.dev/github.com/getsentry/sentry-go#ClientOptions).
56
57If not specified in the SDK initialization, the
58[DSN](https://docs.sentry.io/product/sentry-basics/dsn-explainer/),
59[Release](https://docs.sentry.io/product/releases/) and
60[Environment](https://docs.sentry.io/product/sentry-basics/environments/)
61are read from the environment variables `SENTRY_DSN`, `SENTRY_RELEASE` and
62`SENTRY_ENVIRONMENT`, respectively.
63
64More on this in the [Configuration section of the official Sentry Go SDK documentation](https://docs.sentry.io/platforms/go/configuration/).
65
66## Usage
67
68The SDK supports reporting errors and tracking application performance.
69
70To get started, have a look at one of our [examples](example/):
71- [Basic error instrumentation](example/basic/main.go)
72- [Error and tracing for HTTP servers](example/http/main.go)
73
74We also provide a [complete API reference](https://pkg.go.dev/github.com/getsentry/sentry-go).
75
76For more detailed information about how to get the most out of `sentry-go`,
77checkout the official documentation:
78
79- [Sentry Go SDK documentation](https://docs.sentry.io/platforms/go/)
80- Guides:
81  - [net/http](https://docs.sentry.io/platforms/go/guides/http/)
82  - [echo](https://docs.sentry.io/platforms/go/guides/echo/)
83  - [fasthttp](https://docs.sentry.io/platforms/go/guides/fasthttp/)
84  - [gin](https://docs.sentry.io/platforms/go/guides/gin/)
85  - [iris](https://docs.sentry.io/platforms/go/guides/iris/)
86  - [martini](https://docs.sentry.io/platforms/go/guides/martini/)
87  - [negroni](https://docs.sentry.io/platforms/go/guides/negroni/)
88
89## Resources
90
91- [Bug Tracker](https://github.com/getsentry/sentry-go/issues)
92- [GitHub Project](https://github.com/getsentry/sentry-go)
93- [![GoDoc](https://godoc.org/github.com/getsentry/sentry-go?status.svg)](https://godoc.org/github.com/getsentry/sentry-go)
94- [![go.dev](https://img.shields.io/badge/go.dev-pkg-007d9c.svg?style=flat)](https://pkg.go.dev/github.com/getsentry/sentry-go)
95- [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/platforms/go/)
96- [![Forum](https://img.shields.io/badge/forum-sentry-green.svg)](https://forum.sentry.io/c/sdks)
97- [![Discord](https://img.shields.io/discord/621778831602221064)](https://discord.gg/Ww9hbqr)
98- [![Stack Overflow](https://img.shields.io/badge/stack%20overflow-sentry-green.svg)](http://stackoverflow.com/questions/tagged/sentry)
99- [![Twitter Follow](https://img.shields.io/twitter/follow/getsentry?label=getsentry&style=social)](https://twitter.com/intent/follow?screen_name=getsentry)
100
101## License
102
103Licensed under
104[The 2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause), see
105[`LICENSE`](LICENSE).
106
107## Community
108
109Join Sentry's [`#go` channel on Discord](https://discord.gg/Ww9hbqr) to get
110involved and help us improve the SDK!
111