github.com/facebookincubator/go-belt@v0.0.0-20230703220935-39cd348f1a38/tool/experimental/errmon/types.go (about) 1 // Copyright 2022 Meta Platforms, Inc. and affiliates. 2 // 3 // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 4 // 5 // 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 6 // 7 // 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 // 9 // 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 // 11 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12 13 package errmon 14 15 import ( 16 "github.com/facebookincubator/go-belt/tool/experimental/errmon/types" 17 ) 18 19 // ErrorMonitor is an observability Tool (belt.Tool) which allows 20 // to report about any exceptions which happen for debugging. It 21 // collects any useful information it can. 22 // 23 // An ErrorMonitor implementation is not supposed to be fast, but 24 // it supposed to provide verbose reports (sufficient enough to 25 // debug found problems). 26 type ErrorMonitor = types.ErrorMonitor 27 28 // Event is the full collection of data collected on a specific event to be reported (like a panic or an error). 29 type Event = types.Event 30 31 // Breadcrumb contains auxiliary information about something that happened before 32 // an Event happened, which supposed to help to investigate the Event. 33 // 34 // Supposed to be added as a field (for example through "WithField"). 35 type Breadcrumb = types.Breadcrumb 36 37 // User contains information about an user. 38 // 39 // Supposed to be added as a field (for example through "WithField"). 40 type User = types.User 41 42 // HTTPRequest contains information about an HTTP request. 43 // 44 // Supposed to be added as a field (for example through "WithField"). 45 type HTTPRequest = types.HTTPRequest 46 47 // Package contains information about a software package. 48 // 49 // Supposed to be added as a field (for example through "WithField"). 50 type Package = types.Package 51 52 // Tag contains information about a tag. 53 // 54 // Supposed to be added as a field (for example through "WithField"). 55 type Tag = types.Tag