{"id":21951876,"url":"https://github.com/go-coldbrew/interceptors","last_synced_at":"2026-04-01T19:10:47.946Z","repository":{"id":45221271,"uuid":"328137529","full_name":"go-coldbrew/interceptors","owner":"go-coldbrew","description":"Chained gRPC interceptors for logging, tracing, Prometheus metrics, circuit breaking, and retries","archived":false,"fork":false,"pushed_at":"2026-03-28T09:11:56.000Z","size":357,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-28T13:43:17.332Z","etag":null,"topics":["coldbrew","go","golang","grpc","interceptor","interceptors","microservice","middleware","observability","opentelemetry","prometheus"],"latest_commit_sha":null,"homepage":"https://docs.coldbrew.cloud","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-coldbrew.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-09T11:17:46.000Z","updated_at":"2026-03-28T09:08:18.000Z","dependencies_parsed_at":"2025-03-22T18:11:36.688Z","dependency_job_id":"99b289e8-12f7-4fa8-930c-7cff1865632d","html_url":"https://github.com/go-coldbrew/interceptors","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/go-coldbrew/interceptors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-coldbrew%2Finterceptors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-coldbrew%2Finterceptors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-coldbrew%2Finterceptors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-coldbrew%2Finterceptors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-coldbrew","download_url":"https://codeload.github.com/go-coldbrew/interceptors/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-coldbrew%2Finterceptors/sbom","scorecard":{"id":431550,"data":{"date":"2025-08-11","repo":{"name":"github.com/go-coldbrew/interceptors","commit":"a64aa1650122bc27154d73d261d31f95c022d7bc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":1,"reason":"Found 4/22 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/go-coldbrew/interceptors/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/go-coldbrew/interceptors/go.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T03:28:05.676Z","repository_id":45221271,"created_at":"2025-08-19T03:28:05.676Z","updated_at":"2025-08-19T03:28:05.676Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coldbrew","go","golang","grpc","interceptor","interceptors","microservice","middleware","observability","opentelemetry","prometheus"],"created_at":"2024-11-29T06:18:01.587Z","updated_at":"2026-04-01T19:10:47.917Z","avatar_url":"https://github.com/go-coldbrew.png","language":"Go","readme":"\u003c!-- Code generated by gomarkdoc. DO NOT EDIT --\u003e\n\n[![CI](https://github.com/go-coldbrew/interceptors/actions/workflows/go.yml/badge.svg)](https://github.com/go-coldbrew/interceptors/actions/workflows/go.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/go-coldbrew/interceptors)](https://goreportcard.com/report/github.com/go-coldbrew/interceptors)\n[![GoDoc](https://pkg.go.dev/badge/github.com/go-coldbrew/interceptors.svg)](https://pkg.go.dev/github.com/go-coldbrew/interceptors)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\n\n# interceptors\n\n```go\nimport \"github.com/go-coldbrew/interceptors\"\n```\n\nPackage interceptors provides gRPC server and client interceptors for the ColdBrew framework.\n\nInterceptor configuration functions \\(AddUnaryServerInterceptor, SetFilterFunc, etc.\\) must be called during program initialization, before the gRPC server starts. They are not safe for concurrent use.\n\n## Index\n\n- [Constants](\u003c#constants\u003e)\n- [Variables](\u003c#variables\u003e)\n- [func AddStreamClientInterceptor\\(ctx context.Context, i ...grpc.StreamClientInterceptor\\)](\u003c#AddStreamClientInterceptor\u003e)\n- [func AddStreamServerInterceptor\\(ctx context.Context, i ...grpc.StreamServerInterceptor\\)](\u003c#AddStreamServerInterceptor\u003e)\n- [func AddUnaryClientInterceptor\\(ctx context.Context, i ...grpc.UnaryClientInterceptor\\)](\u003c#AddUnaryClientInterceptor\u003e)\n- [func AddUnaryServerInterceptor\\(ctx context.Context, i ...grpc.UnaryServerInterceptor\\)](\u003c#AddUnaryServerInterceptor\u003e)\n- [func DebugLoggingInterceptor\\(\\) grpc.UnaryServerInterceptor](\u003c#DebugLoggingInterceptor\u003e)\n- [func DefaultClientInterceptor\\(defaultOpts ...interface\\{\\}\\) grpc.UnaryClientInterceptor](\u003c#DefaultClientInterceptor\u003e)\n- [func DefaultClientInterceptors\\(defaultOpts ...interface\\{\\}\\) \\[\\]grpc.UnaryClientInterceptor](\u003c#DefaultClientInterceptors\u003e)\n- [func DefaultClientStreamInterceptor\\(defaultOpts ...interface\\{\\}\\) grpc.StreamClientInterceptor](\u003c#DefaultClientStreamInterceptor\u003e)\n- [func DefaultClientStreamInterceptors\\(defaultOpts ...interface\\{\\}\\) \\[\\]grpc.StreamClientInterceptor](\u003c#DefaultClientStreamInterceptors\u003e)\n- [func DefaultInterceptors\\(\\) \\[\\]grpc.UnaryServerInterceptor](\u003c#DefaultInterceptors\u003e)\n- [func DefaultStreamInterceptors\\(\\) \\[\\]grpc.StreamServerInterceptor](\u003c#DefaultStreamInterceptors\u003e)\n- [func DoHTTPtoGRPC\\(ctx context.Context, svr interface\\{\\}, handler func\\(ctx context.Context, req interface\\{\\}\\) \\(interface\\{\\}, error\\), in interface\\{\\}\\) \\(interface\\{\\}, error\\)](\u003c#DoHTTPtoGRPC\u003e)\n- [func FilterMethodsFunc\\(ctx context.Context, fullMethodName string\\) bool](\u003c#FilterMethodsFunc\u003e)\n- [func GRPCClientInterceptor\\(options ...interface\\{\\}\\) grpc.UnaryClientInterceptor](\u003c#GRPCClientInterceptor\u003e)\n- [func HystrixClientInterceptor\\(defaultOpts ...grpc.CallOption\\) grpc.UnaryClientInterceptor](\u003c#HystrixClientInterceptor\u003e)\n- [func NRHttpTracer\\(pattern string, h http.HandlerFunc\\) \\(string, http.HandlerFunc\\)](\u003c#NRHttpTracer\u003e)\n- [func NewRelicClientInterceptor\\(\\) grpc.UnaryClientInterceptor](\u003c#NewRelicClientInterceptor\u003e)\n- [func NewRelicInterceptor\\(\\) grpc.UnaryServerInterceptor](\u003c#NewRelicInterceptor\u003e)\n- [func OptionsInterceptor\\(\\) grpc.UnaryServerInterceptor](\u003c#OptionsInterceptor\u003e)\n- [func PanicRecoveryInterceptor\\(\\) grpc.UnaryServerInterceptor](\u003c#PanicRecoveryInterceptor\u003e)\n- [func ResponseTimeLoggingInterceptor\\(ff FilterFunc\\) grpc.UnaryServerInterceptor](\u003c#ResponseTimeLoggingInterceptor\u003e)\n- [func ResponseTimeLoggingStreamInterceptor\\(\\) grpc.StreamServerInterceptor](\u003c#ResponseTimeLoggingStreamInterceptor\u003e)\n- [func ServerErrorInterceptor\\(\\) grpc.UnaryServerInterceptor](\u003c#ServerErrorInterceptor\u003e)\n- [func ServerErrorStreamInterceptor\\(\\) grpc.StreamServerInterceptor](\u003c#ServerErrorStreamInterceptor\u003e)\n- [func SetClientMetricsOptions\\(opts ...grpcprom.ClientMetricsOption\\)](\u003c#SetClientMetricsOptions\u003e)\n- [func SetFilterFunc\\(ctx context.Context, ff FilterFunc\\)](\u003c#SetFilterFunc\u003e)\n- [func SetResponseTimeLogLevel\\(ctx context.Context, level loggers.Level\\)](\u003c#SetResponseTimeLogLevel\u003e)\n- [func SetServerMetricsOptions\\(opts ...grpcprom.ServerMetricsOption\\)](\u003c#SetServerMetricsOptions\u003e)\n- [func TraceIdInterceptor\\(\\) grpc.UnaryServerInterceptor](\u003c#TraceIdInterceptor\u003e)\n- [func UseColdBrewClientInterceptors\\(ctx context.Context, flag bool\\)](\u003c#UseColdBrewClientInterceptors\u003e)\n- [func UseColdBrewServerInterceptors\\(ctx context.Context, flag bool\\)](\u003c#UseColdBrewServerInterceptors\u003e)\n- [type FilterFunc](\u003c#FilterFunc\u003e)\n\n\n## Constants\n\n\u003ca name=\"SupportPackageIsVersion1\"\u003e\u003c/a\u003eSupportPackageIsVersion1 is a compile\\-time assertion constant. Downstream packages \\(e.g. core\\) reference this constant to enforce version compatibility. When interceptors makes a breaking change, export a new constant and remove this one to force coordinated updates.\n\n```go\nconst SupportPackageIsVersion1 = true\n```\n\n## Variables\n\n\u003ca name=\"FilterMethods\"\u003e\u003c/a\u003e\n\n```go\nvar (\n    //FilterMethods is the list of methods that are filtered by default\n    FilterMethods = []string{\"healthcheck\", \"readycheck\", \"serverreflectioninfo\"}\n)\n```\n\n\u003ca name=\"AddStreamClientInterceptor\"\u003e\u003c/a\u003e\n## func [AddStreamClientInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L118\u003e)\n\n```go\nfunc AddStreamClientInterceptor(ctx context.Context, i ...grpc.StreamClientInterceptor)\n```\n\nAddStreamClientInterceptor adds a client stream interceptor to default client stream interceptors. Must be called during initialization, before any RPCs are made. Not safe for concurrent use.\n\n\u003ca name=\"AddStreamServerInterceptor\"\u003e\u003c/a\u003e\n## func [AddStreamServerInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L99\u003e)\n\n```go\nfunc AddStreamServerInterceptor(ctx context.Context, i ...grpc.StreamServerInterceptor)\n```\n\nAddStreamServerInterceptor adds a server interceptor to default server interceptors. Must be called during initialization, before the server starts. Not safe for concurrent use.\n\n\u003ca name=\"AddUnaryClientInterceptor\"\u003e\u003c/a\u003e\n## func [AddUnaryClientInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L112\u003e)\n\n```go\nfunc AddUnaryClientInterceptor(ctx context.Context, i ...grpc.UnaryClientInterceptor)\n```\n\nAddUnaryClientInterceptor adds a client interceptor to default client interceptors. Must be called during initialization, before any RPCs are made. Not safe for concurrent use.\n\n\u003ca name=\"AddUnaryServerInterceptor\"\u003e\u003c/a\u003e\n## func [AddUnaryServerInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L93\u003e)\n\n```go\nfunc AddUnaryServerInterceptor(ctx context.Context, i ...grpc.UnaryServerInterceptor)\n```\n\nAddUnaryServerInterceptor adds a server interceptor to default server interceptors. Must be called during initialization, before the server starts. Not safe for concurrent use.\n\n\u003ca name=\"DebugLoggingInterceptor\"\u003e\u003c/a\u003e\n## func [DebugLoggingInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L347\u003e)\n\n```go\nfunc DebugLoggingInterceptor() grpc.UnaryServerInterceptor\n```\n\nDebugLoggingInterceptor is the interceptor that logs all request/response from a handler\n\n\u003ca name=\"DefaultClientInterceptor\"\u003e\u003c/a\u003e\n## func [DefaultClientInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L337\u003e)\n\n```go\nfunc DefaultClientInterceptor(defaultOpts ...interface{}) grpc.UnaryClientInterceptor\n```\n\nDefaultClientInterceptor are the set of default interceptors that should be applied to all client calls\n\n\u003ca name=\"DefaultClientInterceptors\"\u003e\u003c/a\u003e\n## func [DefaultClientInterceptors](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L280\u003e)\n\n```go\nfunc DefaultClientInterceptors(defaultOpts ...interface{}) []grpc.UnaryClientInterceptor\n```\n\nDefaultClientInterceptors are the set of default interceptors that should be applied to all client calls\n\n\u003ca name=\"DefaultClientStreamInterceptor\"\u003e\u003c/a\u003e\n## func [DefaultClientStreamInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L342\u003e)\n\n```go\nfunc DefaultClientStreamInterceptor(defaultOpts ...interface{}) grpc.StreamClientInterceptor\n```\n\nDefaultClientStreamInterceptor are the set of default interceptors that should be applied to all stream client calls\n\n\u003ca name=\"DefaultClientStreamInterceptors\"\u003e\u003c/a\u003e\n## func [DefaultClientStreamInterceptors](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L306\u003e)\n\n```go\nfunc DefaultClientStreamInterceptors(defaultOpts ...interface{}) []grpc.StreamClientInterceptor\n```\n\nDefaultClientStreamInterceptors are the set of default interceptors that should be applied to all stream client calls\n\n\u003ca name=\"DefaultInterceptors\"\u003e\u003c/a\u003e\n## func [DefaultInterceptors](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L261\u003e)\n\n```go\nfunc DefaultInterceptors() []grpc.UnaryServerInterceptor\n```\n\nDefaultInterceptors are the set of default interceptors that are applied to all coldbrew methods\n\n\u003ca name=\"DefaultStreamInterceptors\"\u003e\u003c/a\u003e\n## func [DefaultStreamInterceptors](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L321\u003e)\n\n```go\nfunc DefaultStreamInterceptors() []grpc.StreamServerInterceptor\n```\n\nDefaultStreamInterceptors are the set of default interceptors that should be applied to all coldbrew streams\n\n\u003ca name=\"DoHTTPtoGRPC\"\u003e\u003c/a\u003e\n## func [DoHTTPtoGRPC](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L247\u003e)\n\n```go\nfunc DoHTTPtoGRPC(ctx context.Context, svr interface{}, handler func(ctx context.Context, req interface{}) (interface{}, error), in interface{}) (interface{}, error)\n```\n\n\n\n\u003ca name=\"FilterMethodsFunc\"\u003e\u003c/a\u003e\n## func [FilterMethodsFunc](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L73\u003e)\n\n```go\nfunc FilterMethodsFunc(ctx context.Context, fullMethodName string) bool\n```\n\nFilterMethodsFunc is the default implementation of Filter function\n\n\u003ca name=\"GRPCClientInterceptor\"\u003e\u003c/a\u003e\n## func [GRPCClientInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L453\u003e)\n\n```go\nfunc GRPCClientInterceptor(options ...interface{}) grpc.UnaryClientInterceptor\n```\n\nDeprecated: GRPCClientInterceptor is no longer needed. gRPC tracing is now handled by otelgrpc.NewClientHandler stats handler configured at the client level. This function is retained for backwards compatibility but returns a no\\-op interceptor.\n\n\u003ca name=\"HystrixClientInterceptor\"\u003e\u003c/a\u003e\n## func [HystrixClientInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L467\u003e)\n\n```go\nfunc HystrixClientInterceptor(defaultOpts ...grpc.CallOption) grpc.UnaryClientInterceptor\n```\n\nHystrixClientInterceptor returns a unary client interceptor that executes the RPC inside a Hystrix command.\n\nNote: This interceptor wraps github.com/afex/hystrix\\-go which has been unmaintained since 2018. Consider migrating to github.com/failsafe\\-go/failsafe\\-go for circuit breaker functionality.\n\nThe interceptor applies provided default and per\\-call client options to configure Hystrix behavior \\(for example the command name, disabled flag, excluded errors, and excluded gRPC status codes\\). If Hystrix is disabled via options, the RPC is invoked directly. If the underlying RPC returns an error that matches any configured excluded error or whose gRPC status code matches any configured excluded code, Hystrix fallback is skipped and the RPC error is returned. Panics raised during the RPC invocation are captured and reported to the notifier before being converted into an error. If the RPC itself returns an error, that error is returned; otherwise any error produced by Hystrix is returned.\n\n\u003ca name=\"NRHttpTracer\"\u003e\u003c/a\u003e\n## func [NRHttpTracer](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L561\u003e)\n\n```go\nfunc NRHttpTracer(pattern string, h http.HandlerFunc) (string, http.HandlerFunc)\n```\n\nNRHttpTracer adds newrelic tracing to this http function\n\n\u003ca name=\"NewRelicClientInterceptor\"\u003e\u003c/a\u003e\n## func [NewRelicClientInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L440\u003e)\n\n```go\nfunc NewRelicClientInterceptor() grpc.UnaryClientInterceptor\n```\n\nNewRelicClientInterceptor intercepts all client actions and reports them to newrelic\n\n\u003ca name=\"NewRelicInterceptor\"\u003e\u003c/a\u003e\n## func [NewRelicInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L386\u003e)\n\n```go\nfunc NewRelicInterceptor() grpc.UnaryServerInterceptor\n```\n\nNewRelicInterceptor intercepts all server actions and reports them to newrelic\n\n\u003ca name=\"OptionsInterceptor\"\u003e\u003c/a\u003e\n## func [OptionsInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L377\u003e)\n\n```go\nfunc OptionsInterceptor() grpc.UnaryServerInterceptor\n```\n\n\n\n\u003ca name=\"PanicRecoveryInterceptor\"\u003e\u003c/a\u003e\n## func [PanicRecoveryInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L417\u003e)\n\n```go\nfunc PanicRecoveryInterceptor() grpc.UnaryServerInterceptor\n```\n\n\n\n\u003ca name=\"ResponseTimeLoggingInterceptor\"\u003e\u003c/a\u003e\n## func [ResponseTimeLoggingInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L357\u003e)\n\n```go\nfunc ResponseTimeLoggingInterceptor(ff FilterFunc) grpc.UnaryServerInterceptor\n```\n\nResponseTimeLoggingInterceptor logs response time for each request on server\n\n\u003ca name=\"ResponseTimeLoggingStreamInterceptor\"\u003e\u003c/a\u003e\n## func [ResponseTimeLoggingStreamInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L525\u003e)\n\n```go\nfunc ResponseTimeLoggingStreamInterceptor() grpc.StreamServerInterceptor\n```\n\nResponseTimeLoggingStreamInterceptor logs response time for stream RPCs.\n\n\u003ca name=\"ServerErrorInterceptor\"\u003e\u003c/a\u003e\n## func [ServerErrorInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L398\u003e)\n\n```go\nfunc ServerErrorInterceptor() grpc.UnaryServerInterceptor\n```\n\nServerErrorInterceptor intercepts all server actions and reports them to error notifier\n\n\u003ca name=\"ServerErrorStreamInterceptor\"\u003e\u003c/a\u003e\n## func [ServerErrorStreamInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L541\u003e)\n\n```go\nfunc ServerErrorStreamInterceptor() grpc.StreamServerInterceptor\n```\n\nServerErrorStreamInterceptor intercepts server errors for stream RPCs and reports them to the error notifier.\n\n\u003ca name=\"SetClientMetricsOptions\"\u003e\u003c/a\u003e\n## func [SetClientMetricsOptions](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L137\u003e)\n\n```go\nfunc SetClientMetricsOptions(opts ...grpcprom.ClientMetricsOption)\n```\n\nSetClientMetricsOptions appends gRPC client metrics options. Must be called during initialization, before the server starts. Not safe for concurrent use.\n\n\u003ca name=\"SetFilterFunc\"\u003e\u003c/a\u003e\n## func [SetFilterFunc](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L85\u003e)\n\n```go\nfunc SetFilterFunc(ctx context.Context, ff FilterFunc)\n```\n\nSetFilterFunc sets the default filter function to be used by interceptors. Must be called during initialization, before the server starts. Not safe for concurrent use.\n\n\u003ca name=\"SetResponseTimeLogLevel\"\u003e\u003c/a\u003e\n## func [SetResponseTimeLogLevel](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L65\u003e)\n\n```go\nfunc SetResponseTimeLogLevel(ctx context.Context, level loggers.Level)\n```\n\nSetResponseTimeLogLevel sets the log level for response time logging. Default is InfoLevel. Must be called during initialization, before the server starts. Not safe for concurrent use.\n\n\u003ca name=\"SetServerMetricsOptions\"\u003e\u003c/a\u003e\n## func [SetServerMetricsOptions](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L131\u003e)\n\n```go\nfunc SetServerMetricsOptions(opts ...grpcprom.ServerMetricsOption)\n```\n\nSetServerMetricsOptions appends gRPC server metrics options \\(histogram, labels, namespace, etc.\\). Must be called during initialization, before the server starts. Not safe for concurrent use.\n\n\u003ca name=\"TraceIdInterceptor\"\u003e\u003c/a\u003e\n## func [TraceIdInterceptor](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L583\u003e)\n\n```go\nfunc TraceIdInterceptor() grpc.UnaryServerInterceptor\n```\n\nTraceIdInterceptor allows injecting trace id from request objects\n\n\u003ca name=\"UseColdBrewClientInterceptors\"\u003e\u003c/a\u003e\n## func [UseColdBrewClientInterceptors](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L125\u003e)\n\n```go\nfunc UseColdBrewClientInterceptors(ctx context.Context, flag bool)\n```\n\nUseColdBrewClientInterceptors allows enabling/disabling coldbrew client interceptors. When set to false, the coldbrew client interceptors will not be used. Must be called during initialization, before any RPCs are made. Not safe for concurrent use.\n\n\u003ca name=\"UseColdBrewServerInterceptors\"\u003e\u003c/a\u003e\n## func [UseColdBrewServerInterceptors](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L106\u003e)\n\n```go\nfunc UseColdBrewServerInterceptors(ctx context.Context, flag bool)\n```\n\nUseColdBrewServerInterceptors allows enabling/disabling coldbrew server interceptors. When set to false, the coldbrew server interceptors will not be used. Must be called during initialization, before the server starts. Not safe for concurrent use.\n\n\u003ca name=\"FilterFunc\"\u003e\u003c/a\u003e\n## type [FilterFunc](\u003chttps://github.com/go-coldbrew/interceptors/blob/main/interceptors.go#L70\u003e)\n\nIf it returns false, the given request will not be traced.\n\n```go\ntype FilterFunc func(ctx context.Context, fullMethodName string) bool\n```\n\nGenerated by [gomarkdoc](\u003chttps://github.com/princjef/gomarkdoc\u003e)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-coldbrew%2Finterceptors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-coldbrew%2Finterceptors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-coldbrew%2Finterceptors/lists"}