Socket
Socket
Sign inDemoInstall

gcl-slack

Package Overview
Dependencies
110
Maintainers
7
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gcl-slack

- Supports Slack webhook and the Slack API βš™οΈ - [Slack blocks] πŸ“¦ - Sends logs to Slack from all services in your project, including Kubernetes πŸ“¬


Version published
Weekly downloads
6
decreased by-83.33%
Maintainers
7
Created
Weekly downloads
Β 

Changelog

Source

3.1.1 (2023-08-21)

Bug Fixes

  • deps: update dependency pubsub-http-handler to v6 (#223) (b34a7e1)

Readme

Source

Logo

Slack for Google Cloud Logging

Transport messages (and objects) from Google Cloud Logging to Slack

Quick Start Guide Β· Request Feature Β· Report Bug


lifecycle code style: prettier Commitizen friendly Release

Language grade: JavaScript codecov Maintainability

gcl-slack consumes logs from Google Cloud Logger and forwards them to Slack. Use this library to let your team know something happened in your app, an exception is thrown or use the special slack object to turn structured logs to well-formatted Slack messages.

:zap: Β  Features

  • Supports Slack webhook and the Slack API βš™οΈ
  • Slack blocks πŸ“¦
  • Sends logs to Slack from all services in your project, including Kubernetes πŸ“¬

:space_invader: Β  Usage

This project can be deployed using Docker or using Cloud Function (v1). We recommend using Docker, hosted on Google Cloud Run from GitHub Container Registry.

docker pull ghcr.io/bjerkio/google-cloud-logger-slack:v3.1.0

You can find examples on how to deploy this project in the examples folder, there are both terraform and [pulumi] examples

If you want to use the Cloud Function, you can use the following command to install it to your project:

β–Ά yarn add gcl-slack

You can deploy however you want, with Pulumi's Callback Function or with Firebase CLI, see the examples.

We are currently building this library out, and once things are ready for production loads, we'll add tutorials to make it easier to configure this

You'll need to configure a sink in order to make this work. The basic design of this library, is that you'll create a search query which you add to a sink to forward log entries to gcl-slack.

Turn structured logs to well-formatted Slack messages

This package solves two issues, a) forwarding information from Cloud Logger to Slack and b) offload requests to Slack API / webhooks.

Sometimes we want to be notified on Slack when something happens – let's say a user is created or a customer subscribed to your service. Since the stdout of our application is hooked into Cloud Logging by default, we can output a message or a JSON object (structured logging). With a sink, we can route log entites to this library through Google PubSub.

To create more than just a simple message, you can use slack objects, which is the same as you would send to either the Slack API or webhooks to create well-formatted slack messages.

Let your Kubernetes Pod, Cloud Run or Cloud Functions focus on core business, and distribute your logging to Slack with this library!

Contribute & Disclaimer

We love to get help πŸ™ Read more about how to get started in CONTRIBUTING 🌳

Keywords

FAQs

Last updated on 21 Aug 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc