layout | title | permalink | description | nav_order |
---|---|---|---|---|
default |
Integrations |
/integrations |
coldbrew integrations with other services and tools |
3 |
{: .no_toc } Coldbrew is designed to be very thin wrappers over other services and tools. This page lists the services and tools that Coldbrew integrates with.
These integrations are optional and you can choose to use them or not. You can also choose to use other services and tools instead of the ones listed here. Coldbrew is designed to be flexible and easy to integrate with other services and tools.
If you want to integrate Coldbrew with a service or tool that is not listed here, please [open an issue].
{: .no_toc .text-delta }
- TOC {:toc}
Coldbrew relies on GRPC Gateway to expose the gRPC API as a REST API. The gateway is a proxy that translates a RESTful HTTP API into gRPC. It's a great tool to expose gRPC services to the web and mobile clients.
To see how it works in Coldbrew, check out the gRPC Gateway example.
New Relic is a SaaS-based monitoring tool that helps to monitor the performance of the services. It collects data about the services and displays it in a dashboard. It also provides alerts when the service is not performing well.
To configure New Relic, set the following environment variables as defined in Config
NEW_RELIC_APPNAME
: New Relic app name (e.g.my-app
)NEW_RELIC_LICENSE_KEY
: New Relic license keyNEW_RELIC_OPENTELEMETRY
: Set totrue
to use New Relic Opentelemetry interfaceNEW_RELIC_DISTRIBUTED_TRACING
: Set totrue
to enable distributed tracingNEW_RELIC_OPENTELEMETRY_SAMPLE
: Set to float value between0
and1
to set the sampling rate for distributed tracing
If you app is using Coldbrew cookiecutter template, initialisation is done automatically.
If you are using Coldbrew packages in your app, you need to initialise New Relic manually. To initialise New Relic use the SetupNewRelic function and to initialise New Relic Opentelemetry use the SetupNROpenTelemetry function from the go-coldbrew/core
package.
To use New Relic tracing in your app, use the Coldbrew tracing and interceptors packages. They will setup the New Relic tracing provider and add the tracing middleware to the gRPC and HTTP servers.
You can also add more tracing to your app by adding tracing to your functions.
Coldbrew uses Prometheus to collect metrics from the services. Prometheus is an open-source systems monitoring and alerting toolkit originally built at SoundCloud. It includes a time series database, a query language, and a visualization UI.
To configure Prometheus, set the following environment variables as defined in Config
DISABLE_PROMETHEUS
: Set totrue
to disable Prometheus/metrics
endpointENABLE_PROMETHEUS_GRPC_HISTOGRAM
: Set totrue
to enable Prometheus gRPC histograms
If you app is using Coldbrew cookiecutter template, initialisation is done automatically.
If you are using Coldbrew packages in your app, you need to initialise Prometheus manually. Make sure you expose Prometheus /metrics
endpoint in your app and add the interceptors to your gRPC and HTTP servers.
Coldbrew uses the prometheus/client_golang package to collect metrics. To see how to use it check out the metrics documentation.
Sentry is an error tracking tool that helps to monitor and fix crashes in real time. It collects data about the errors and displays it in a dashboard. It also provides alerts when the service is not performing well.
To configure Sentry, set the following environment variables as defined in Config
SENTRY_DSN
: Sentry DSNENVIRONMENT
: Environment (e.g.production
)RELEASE
: App release (e.g.v1.0.0
)
If you app is using Coldbrew cookiecutter template, initialisation is done automatically.
If you are using Coldbrew packages in your app, you need to initialise Sentry manually. To initialise Sentry use the SetupSentry function from the go-coldbrew/core
package.
To use Sentry in your app, have a look at the errors documentation.
Opentelemetry is a collection of tools that help to collect and analyze telemetry data. It includes a time series database, a query language, and a visualization UI.
If you app is using Coldbrew cookiecutter template, initialisation is done automatically.
If you are using Coldbrew packages in your app, you need to initialise Opentelemetry manually. To initialise Opentelemetry follow the Opentelemetry documentation and configure the otel exporter to send the data.
To initialise New Relic Opentelemetry use the SetupNROpenTelemetry function from the go-coldbrew/core
package.
To use Opentelemetry tracing in your app, use the Coldbrew tracing and interceptors packages.
You can also add more tracing to your app by adding tracing to your functions.
Buf is a tool for managing protocol buffers. It can be used to generate code, lint proto files, and more. Buf simplifies the process of managing proto files and helps to keep them consistent across the team. It also helps to avoid common mistakes and helps to keep the proto files up to date.
Coldbrew cookiecutter template includes a buf.yaml
file that configures Buf to generate code for the gRPC service. The code generation config is stored in the buf.gen.yaml
file.
All Coldbrew packages are designed to be used as standalone packages. They can be used in any Go project. They are not tied to Coldbrew and can be used in any Go project.
When you build your service using Coldbrew cookiecutter template, it includes the Core package which initialises all the packages and sets up the service. You can use the Core package in any Go project to set up the service.
To see all the Coldbrew packages, check out the Coldbrew packages page.