backtrace-labs / backtrace-go Goto Github PK
View Code? Open in Web Editor NEWGo integration with Backtrace object store.
Go integration with Backtrace object store.
here are some for inspiration
"application": "foo", // source application of fault
"cpu.boottime": 1234234234, // time when system was booted
"cpu.context": 1234, // the number of context switches on the system
"cpu.idle": 1234234, // idle cpu time
"cpu.iowait": 1234143, // time waiting for I/O to complete
"cpu.irq": 1234113, // time servicing interrupts
"cpu.kernel": "foo", // kernel cpu utilization
"cpu.nice": "foo", // scheduling nice value
"cpu.process.blocked": 1234, // number of blocked processes
"cpu.process.count": 1234, // number of processes
"cpu.process.running": 1234, // number of running processes
"cpu.softirq": "foo", // time servicing soft-interrupts
"cpu.user": 1234, // user cpu utilization
"descriptor.count": 1234, // descriptor table size
// memory address associated with fault [memory_address]
"fault.address": "foo",
"fingerprint": "foo", // primary fault signature [sha256]
"hostname": "foo", // hostname of the faulting system [hostname]
"process.age": 1234, // age of faulting process [seconds]
"sched.cs.involuntary": 1234, // number of involuntary context switches
"sched.cs.voluntary": 1234, // number of voluntary context switches
"system.memory.active": 1234, // recently used memory [bytes]
// temporary storage for raw disk blocks [bytes]
"system.memory.buffers": 1234,
"system.memory.cached": 1234, // buffer cache size for files [bytes]
// memory waiting to get written back to disk [bytes]
"system.memory.dirty": 1234,
"system.memory.free": 1234, // amount of free memory [bytes]
// memory that has not been recently used [bytes]
"system.memory.inactive": 1234,
"system.memory.slab": 1234, // kernel data structure cache [bytes]
"system.memory.swap.cached": 1234, // memory still backed by swap [bytes]
"system.memory.swap.free": 1234, // unused swap space [bytes]
"system.memory.swap.total": 1234, // total swap space [bytes]
"system.memory.total": 1234, // total usable memory [bytes]
// largest free contiguous block of vmalloc area [bytes]
"system.memory.vmalloc.chunk": 1234,
"system.memory.vmalloc.total": 1234, // vmalloc memory area [bytes]
"system.memory.vmalloc.used": 1234, // used vmalloc memory area [bytes]
// memory that is being written back to disk [bytes]
"system.memory.writeback": 1234,
"uname.machine": "x86_64", // machine hardware name
"uname.release": "4.4.0-38-generic", // kernel release
"uname.sysname": "Linux", // kernel name
// kernel version
"uname.version": "#57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016",
"vm.data.size": 1234, // size of data segment [bytes]
"vm.locked.size": 1234, // locked memory size [bytes]
"vm.pte.size": 1234, // page table entries size [bytes]
"vm.rss.peak": 1234, // peak resident memory size [bytes]
"vm.rss.size": 1234, // resident memory size [bytes]
"vm.shared.size": 1234, // shared library size [bytes]
"vm.stack.size": 1234, // size of stack segment [bytes]
"vm.swap.size": 1234, // swap memory size [bytes]
"vm.vma.peak": 1234, // peak virtual memory size [bytes]
"vm.vma.size": 1234, // virtual memory size [bytes]
"mem.rss": 1234,
"mem.heap.total": 1234,
"mem.heap.used": 1234,
"error.message": "Unexpected token h", // Main message used in the error.
we can also probably add some goroutine and garbage collection stats
Currently, when a panic is caught and reported, it does not actually contain the word "panic" anywhere.
Panics should be treated as more serious, called out, and escalated in some way. Perhaps an attribute, such as report_type
could be sent, containing error
or panic
, etc.
This would allow for panic
reports to be addressed differently, such as sending a more urgent email, slack message or displaying it in red, or at the top, etc, of the dashboard.
The typical use case for deploying Go apps is to create a static executable and copy that onto the production server. In this situation we will fail to find the source code for all the files.
However it's pretty reasonable for a user to have their source tree checked out and up to date in a repository somewhere on the server.
The API should allow the user to set the directory where this source code lives, and then backtrace-go can find the source files just fine.
At this point, however, it may be more convenient to get server-side source repository integration going, since this works reliably in even native environments.
After one panic has been sent, the entire system deadlocks and all future requests time out.
I believe this is because the background worker sendWorkerMain
is being killed after the panic is reported.
See https://github.com/backtrace-labs/backtrace-go/blob/master/main.go#L212
I would absolutely love to see panicparse integrated into backtrace.
This would allow for much more focused, concise reports to be generated. It would make it much easier for clients to see where the actual issue is and fix it faster. This could be done instead of #9.
This package is available as a library, so integrating it directly into backtrace-go
should be simple.
Currently, backtrace gathers all environment variables by default and sends them to the backtrace server. This feels aggressive as secrets are often/typically stored in environment variables, and I don't want those secrets going to a 3rd party service.
This project and https://github.com/backtrace-labs/go-bcd should be in the same package.
The callstack that is getting reported includes quite a few frames about backtrace-go
. I don't care about the state of the stack inside the reporting framework. I want the top of the stack to start at my own code.
I'm guessing something like skipping a frame if frame_item.library
contains backtrace-go
would do the trick.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.