All Projects → stackimpact → Stackimpact Go

stackimpact / Stackimpact Go

Licence: other
DEPRECATED StackImpact Go Profiler - Production-Grade Performance Profiler: CPU, memory allocations, blocking calls, errors, metrics, and more

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Stackimpact Go

Goappmonitor
Golang application performance data monitoring.
Stars: ✭ 478 (+73.19%)
Mutual labels:  monitoring, tracing, agent, profiler, performance-analysis, performance-metrics, performance-tuning
Stackimpact Nodejs
DEPRECATED StackImpact Node.js Profiler - Production-Grade Performance Profiler: CPU, memory allocations, async calls, errors, metrics, and more
Stars: ✭ 46 (-83.33%)
Mutual labels:  monitoring, tracing, agent, profiler, performance-analysis, performance-metrics, performance-tuning
Stackimpact Java
StackImpact Java Profiler - Production-Grade Performance Profiler: CPU, locks, runtime metrics, and more
Stars: ✭ 7 (-97.46%)
Mutual labels:  monitoring, agent, profiler, performance-analysis, performance-metrics, performance-tuning
Myperf4j
High performance Java APM. Powered by ASM. Try it. Test it. If you feel its better, use it.
Stars: ✭ 2,281 (+726.45%)
Mutual labels:  monitoring, agent, profiler, performance-analysis, performance-metrics, performance-tuning
Inspectit
inspectIT is the leading Open Source APM (Application Performance Management) tool for analyzing your Java (EE) applications.
Stars: ✭ 513 (+85.87%)
Mutual labels:  monitoring, agent, performance-analysis, performance-metrics, performance-tuning
Stackimpact Python
DEPRECATED StackImpact Python Profiler - Production-Grade Performance Profiler: CPU, memory allocations, blocking calls, exceptions, metrics, and more
Stars: ✭ 671 (+143.12%)
Mutual labels:  monitoring, profiler, performance-metrics, performance-tuning
Spm Agent Nodejs
NodeJS Monitoring Agent
Stars: ✭ 51 (-81.52%)
Mutual labels:  monitoring, tracing, agent, performance-metrics
Sparklens
Qubole Sparklens tool for performance tuning Apache Spark
Stars: ✭ 345 (+25%)
Mutual labels:  performance-analysis, performance-metrics, performance-tuning
Profimp
Python import profiler
Stars: ✭ 52 (-81.16%)
Mutual labels:  profiler, performance-analysis, performance-tuning
Sitespeed.io
Sitespeed.io is an open source tool that helps you monitor, analyze and optimize your website speed and performance, based on performance best practices advices from the coach and collecting browser metrics using the Navigation Timing API, User Timings and Visual Metrics (FirstVisualChange, SpeedIndex & LastVisualChange).
Stars: ✭ 4,255 (+1441.67%)
Mutual labels:  monitoring, performance-analysis, performance-metrics
Spm Agent Mongodb
Sematext Agent for monitoring MongoDB
Stars: ✭ 7 (-97.46%)
Mutual labels:  monitoring, agent, performance-metrics
Pcm
Processor Counter Monitor
Stars: ✭ 1,240 (+349.28%)
Mutual labels:  monitoring, performance-analysis, performance-metrics
Apm Agent Php
Elastic APM PHP Agent
Stars: ✭ 129 (-53.26%)
Mutual labels:  monitoring, tracing, performance-analysis
Scouter
Scouter is an open source APM (Application Performance Management) tool.
Stars: ✭ 1,792 (+549.28%)
Mutual labels:  monitoring, agent, performance-metrics
Pinpoint
APM, (Application Performance Management) tool for large-scale distributed systems.
Stars: ✭ 11,883 (+4205.43%)
Mutual labels:  monitoring, tracing, agent
ember-appmetrics
Ember library used to measure various metrics in your Ember app with ultra simple APIs.
Stars: ✭ 16 (-94.2%)
Mutual labels:  performance-metrics, performance-analysis
Cat
CAT 作为服务端项目基础组件,提供了 Java, C/C++, Node.js, Python, Go 等多语言客户端,已经在美团点评的基础架构中间件框架(MVC框架,RPC框架,数据库框架,缓存框架等,消息队列,配置系统等)深度集成,为美团点评各业务线提供系统丰富的性能指标、健康状况、实时告警等。
Stars: ✭ 16,236 (+5782.61%)
Mutual labels:  monitoring, tracing
jamonapi
Another repo for jamonapi.com which is primarily hosted on sourceforge
Stars: ✭ 57 (-79.35%)
Mutual labels:  performance-metrics, performance-tuning
performance-node
Performance for Node.js
Stars: ✭ 17 (-93.84%)
Mutual labels:  performance-metrics, performance-analysis
Ingraind
Data first monitoring agent using (e)BPF, built on RedBPF
Stars: ✭ 251 (-9.06%)
Mutual labels:  monitoring, agent

StackImpact Go Profiler

Overview

StackImpact is a production-grade performance profiler built for both production and development environments. It gives developers continuous and historical code-level view of application performance that is essential for locating CPU, memory allocation and I/O hot spots as well as latency bottlenecks. Included runtime metrics and error monitoring complement profiles for extensive performance analysis. Learn more at stackimpact.com.

dashboard

Features

  • Continuous hot spot profiling of CPU usage, memory allocation and blocking calls.
  • Continuous latency bottleneck tracing.
  • Error and panic monitoring.
  • Health monitoring including CPU, memory, garbage collection and other runtime metrics.
  • Alerts on profile anomalies.
  • Team access.

Learn more on the features page (with screenshots).

How it works

The StackImpact profiler agent is imported into a program and used as a normal package. When the program runs, various sampling profilers are started and stopped automatically by the agent and/or programmatically using the agent methods. The agent periodically reports recorded profiles and metrics to the StackImpact Dashboard. The agent can also operate in manual mode, which should be used in development only.

Documentation

See full documentation for reference.

Requirements

Linux, OS X or Windows. Go version 1.5+.

Getting started

Create StackImpact account

Sign up for a free trial account at stackimpact.com (also with GitHub login).

Installing the agent

Install the Go agent by running

go get github.com/stackimpact/stackimpact-go

And import the package github.com/stackimpact/stackimpact-go in your application.

Configuring the agent

Start the agent by specifying the agent key and application name. The agent key can be found in your account's Configuration section.

agent := stackimpact.Start(stackimpact.Options{
	AgentKey: "agent key here",
	AppName: "MyGoApp",
})

All initialization options:

  • AgentKey (Required) The access key for communication with the StackImpact servers.
  • AppName (Required) A name to identify and group application data. Typically, a single codebase, deployable unit or executable module corresponds to one application. Sometimes also referred as a service.
  • AppVersion (Optional) Sets application version, which can be used to associate profiling information with the source code release.
  • AppEnvironment (Optional) Used to differentiate applications in different environments.
  • HostName (Optional) By default, host name will be the OS hostname.
  • ProxyAddress (Optional) Proxy server URL to use when connecting to the Dashboard servers.
  • HTTPClient (Optional) An http.Client instance to be used instead of the default client for reporting data to Dashboard servers.
  • DisableAutoProfiling (Optional) If set to true, disables the default automatic profiling and reporting. Focused or manual profiling should be used instead. Useful for environments without support for timers or background tasks.
  • Debug (Optional) Enables debug logging.
  • Logger (Optional) A log.Logger instance to be used instead of default STDOUT logger.

Basic example

package main

import (
	"fmt"
	"net/http"

	"github.com/stackimpact/stackimpact-go"
)

func handler(w http.ResponseWriter, r *http.Request) {
	fmt.Fprintf(w, "Hello world!")
}

func main() {
	agent := stackimpact.Start(stackimpact.Options{
		AgentKey: "agent key here",
		AppName: "Basic Go Server",
		AppVersion: "1.0.0",
		AppEnvironment: "production",
	})

	http.HandleFunc(agent.ProfileHandlerFunc("/", handler)) 
	http.ListenAndServe(":8080", nil)
}

Focused profiling

Focused profiling is suitable for repeating code, such as request or event handlers. By default, the agent starts and stops profiling automatically. In order to make sure the agent profiles the most relevant execution intervals, the following methods can be used. In addition to more precise profiling, timing information will also be reported for the profiled spans.

// Use this method to instruct the agent to start and stop 
// profiling. It does not guarantee that any profiler will be 
// started. The decision is made by the agent based on the 
// overhead constraints. The method returns Span object, on 
// which the Stop() method should be called. 
span := agent.Profile();
defer span.Stop();
// This method is similar to the Profile() method. It additionally
// allows to specify a span name to group span timing measurements.
span := agent.ProfileWithName(name);
defer span.Stop();
// A helper function to profile HTTP handler execution by wrapping 
// http.Handle method parameters.
// Usage example:
//   http.Handle(agent.ProfileHandler("/some-path", someHandler))
pattern, wrappedHandler := agent.ProfileHandler(pattern, handler)
// A helper function to profile HTTP handler function execution 
// by wrapping http.HandleFunc method parameters.
// Usage example:
//   http.HandleFunc(agent.ProfileHandlerFunc("/some-path", someHandlerFunc))
pattern, wrappedHandlerFunc := agent.ProfileHandlerFunc(pattern, handlerFunc)

Error reporting

To monitor exceptions and panics with stack traces, the error recording API can be used.

Recording handled errors:

// Aggregates and reports errors with regular intervals.
agent.RecordError(someError)

Recording panics without recovering:

// Aggregates and reports panics with regular intervals.
defer agent.RecordPanic()

Recording and recovering from panics:

// Aggregates and reports panics with regular intervals. This function also
// recovers from panics.
defer agent.RecordAndRecoverPanic()

Manual profiling

Manual profiling should not be used in production!

By default, the agent starts and stops profiling automatically. Manual profiling allows to start and stop profilers directly. It is suitable for profiling short-lived programs and should not be used for long-running production applications. Automatic profiling should be disabled with DisableAutoProfiling: true.

// Start CPU profiler.
agent.StartCPUProfiler();
// Stop CPU profiler and report the recorded profile to the Dashboard.
// Automatic profiling should be disabled.
agent.StopCPUProfiler();
// Start blocking call profiler.
agent.StartBlockProfiler();
// Stop blocking call profiler and report the recorded profile to the Dashboard.
agent.StopBlockProfiler();
// Report current allocation profile to the Dashboard.
agent.ReportAllocationProfile();

Analyzing performance data in the Dashboard

Once your application is restarted, you can start observing continuously recorded CPU, memory, I/O, and other hot spot profiles, execution bottlenecks as well as process metrics in the Dashboard.

Troubleshooting

To enable debug logging, add Debug: true to startup options. If the debug log doesn't give you any hints on how to fix a problem, please report it to our support team in your account's Support section.

Overhead

The agent overhead is measured to be less than 1% for applications under high load.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].