rollbar

package
v1.30.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 9 Imported by: 9

README

rollbar webhooks

You should configure your Rollbar's Webhooks to point at the webhooks service. To do this go to rollbar.com and click Settings > Notifications > Webhook. In the resulting page set URL to http://<my_ip>:1619/rollbar, and click on Enable Webhook Integration.

Events

The titles of the following sections are links to the full payloads and details for each event. The body contains what information from the event is persisted. The format is as follows:

# TAGS
* 'tagKey' = `tagValue` type
# FIELDS
* 'fieldKey' = `fieldValue` type

The tag values and field values show the place on the incoming JSON object where the data is sourced from.

See webhook doc

new_item event

Tags:

  • 'event' = event.event_name string
  • 'environment' = event.data.item.environment string
  • 'project_id = event.data.item.project_id int
  • 'language' = event.data.item.last_occurence.language string
  • 'level' = event.data.item.last_occurence.level string

Fields:

  • 'id' = event.data.item.id int
occurrence event

Tags:

  • 'event' = event.event_name string
  • 'environment' = event.data.item.environment string
  • 'project_id = event.data.item.project_id int
  • 'language' = event.data.occurrence.language string
  • 'level' = event.data.occurrence.level string

Fields:

  • 'id' = event.data.item.id int
deploy event

Tags:

  • 'event' = event.event_name string
  • 'environment' = event.data.deploy.environment string
  • 'project_id = event.data.deploy.project_id int

Fields:

  • 'id' = event.data.item.id int

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deploy

type Deploy struct {
	EventName string     `json:"event_name"`
	Data      DeployData `json:"data"`
}

func (*Deploy) Fields

func (ni *Deploy) Fields() map[string]interface{}

func (*Deploy) Tags

func (ni *Deploy) Tags() map[string]string

type DeployData

type DeployData struct {
	Deploy DeployDataDeploy `json:"deploy"`
}

type DeployDataDeploy

type DeployDataDeploy struct {
	ID          int    `json:"id"`
	Environment string `json:"environment"`
	ProjectID   int    `json:"project_id"`
}

type DummyEvent

type DummyEvent struct {
	EventName string `json:"event_name"`
}

type Event

type Event interface {
	Tags() map[string]string
	Fields() map[string]interface{}
}

func NewEvent

func NewEvent(dummyEvent *DummyEvent, data []byte) (Event, error)

type NewItem

type NewItem struct {
	EventName string      `json:"event_name"`
	Data      NewItemData `json:"data"`
}

func (*NewItem) Fields

func (ni *NewItem) Fields() map[string]interface{}

func (*NewItem) Tags

func (ni *NewItem) Tags() map[string]string

type NewItemData

type NewItemData struct {
	Item NewItemDataItem `json:"item"`
}

type NewItemDataItem

type NewItemDataItem struct {
	ID            int                          `json:"id"`
	Environment   string                       `json:"environment"`
	ProjectID     int                          `json:"project_id"`
	LastOccurence NewItemDataItemLastOccurence `json:"last_occurrence"`
}

type NewItemDataItemLastOccurence

type NewItemDataItemLastOccurence struct {
	Language string `json:"language"`
	Level    string `json:"level"`
}

type Occurrence

type Occurrence struct {
	EventName string         `json:"event_name"`
	Data      OccurrenceData `json:"data"`
}

func (*Occurrence) Fields

func (o *Occurrence) Fields() map[string]interface{}

func (*Occurrence) Tags

func (o *Occurrence) Tags() map[string]string

type OccurrenceData

type OccurrenceData struct {
	Item       OccurrenceDataItem       `json:"item"`
	Occurrence OccurrenceDataOccurrence `json:"occurrence"`
}

type OccurrenceDataItem

type OccurrenceDataItem struct {
	ID          int    `json:"id"`
	Environment string `json:"environment"`
	ProjectID   int    `json:"project_id"`
}

type OccurrenceDataOccurrence

type OccurrenceDataOccurrence struct {
	Language string `json:"language"`
	Level    string `json:"level"`
}

type RollbarWebhook

type RollbarWebhook struct {
	Path string

	auth.BasicAuth
	// contains filtered or unexported fields
}

func (*RollbarWebhook) Register

func (rb *RollbarWebhook) Register(router *mux.Router, acc telegraf.Accumulator, log telegraf.Logger)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL