Code Monkey home page Code Monkey logo

k8sdeploy's People

Contributors

pyang55 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

k8sdeploy's Issues

What is your license?

Hi, I've just briefly read your repo and would want to try, but first can you please update the LICENSE file for your repo? Thanks

Setup Airbrake for your Go application

Installing with the CLI

The Airbrake CLI installs the Airbrake Go notifier automatically in your Go project. To install the notifier directly without using the CLI, please scroll down to the Installing manually section.

Install the CLI via Homebrew

brew install airbrake/airbrake-cli/airbrake

Authenticate via config command

Authenticate by setting your user-key with the config command:

airbrake config set user-key YOUR_USER_KEY_HERE

You can find your user key in your profile settings page.

Install command

Invoke the following to have the Airbrake CLI install the Airbrake notifier for your project:

airbrake install --project-id YOUR_PROJECT_ID_HERE

You can find your project ID in your project's settings.

After this, you are set! Check out the Testing your installation section to send a test error to Airbrake.

Installing manually

Install in existing project

Navigate to your project's main directory and install our Go package, gobrake:

go get github.com/airbrake/gobrake/v5

Install in new app

Create a new directory, initialize a new module and go get the library:

mkdir airbrake_example && cd airbrake_example
go mod init airbrake_example
go get github.com/airbrake/gobrake/v5

Configuration

Import and initialize the gobrake package in your application:

(You can find your project ID and project key in your project's settings)

package main

import "github.com/airbrake/gobrake/v5"

var airbrake = gobrake.NewNotifierWithOptions(&gobrake.NotifierOptions{
	ProjectId: <Your project ID>,
	ProjectKey: "<Your project ID>",
	Environment: "production",
})

func main() {
	defer airbrake.Close()
	defer airbrake.NotifyOnPanic()
}

That's it! The airbrake.NotifyOnPanic() call will handle automatic panic reporting.

Testing your installation

You can use airbrake.Notify() to send handled errors. Let's use it now to check if gobrake is installed correctly:

import "errors"

func testAirbrake() {
	airbrake.Notify(errors.New("Error Test from Airbrake"), nil)
}

You should see this dashboard updating with your test error soon after you run that function.

Full documentation

Check out our official GitHub repo for info on advanced features like ignoring errors, setting error severity and more.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.