npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gcl-slack

v3.1.1

Published

- Supports Slack webhook and the Slack API ⚙️ - [Slack blocks] 📦 - Sends logs to Slack from all services in your project, including Kubernetes 📬

Downloads

80

Readme


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 🌳