Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnbellone/grpc-middleware-sentry
gRPC Go middleware for Sentry: server and client interceptors
https://github.com/johnbellone/grpc-middleware-sentry
go golang grpc grpc-go interceptor library middleware sentry
Last synced: 3 days ago
JSON representation
gRPC Go middleware for Sentry: server and client interceptors
- Host: GitHub
- URL: https://github.com/johnbellone/grpc-middleware-sentry
- Owner: johnbellone
- License: apache-2.0
- Created: 2021-01-14T17:17:20.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-26T16:40:29.000Z (2 months ago)
- Last Synced: 2025-01-23T06:05:45.498Z (10 days ago)
- Topics: go, golang, grpc, grpc-go, interceptor, library, middleware, sentry
- Language: Go
- Homepage:
- Size: 708 KB
- Stars: 45
- Watchers: 1
- Forks: 17
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Go gRPC Middleware for Sentry
[gRPC Go middleware][0] for [Sentry][1]: server and client interceptors## Middleware
``` go
import (
"github.com/getsentry/sentry-go"grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
grpc_sentry "github.com/johnbellone/grpc-middleware-sentry"
)func main() {
err = sentry.Init(sentry.ClientOptions{
Dsn: "https://[email protected]/42",
Debug: false,
Environment: "development",
Release: "[email protected]",
IgnoreErrors: []string{},
})
defer sentry.Flush(2 * time.Second)
if err != nil {
logger.Fatal(err.Error())
}s := grpc.NewServer(
grpc.StreamInterceptor(grpc_middleware.ChainStreamServer(
grpc_sentry.StreamServerInterceptor(),
)),
grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(
grpc_sentry.UnaryServerInterceptor(),
)),
)
}
```[0]: https://github.com/grpc-ecosystem/go-grpc-middleware
[1]: https://sentry.io