Applicationinsights-go

module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2017 License: MIT

README

Microsoft Application Insights SDK for Go

Build Status

This project provides a Go SDK for Application Insights. Application Insights is a service that allows developers to keep their applications available, performant, and successful. This go package will allow you to send telemetry of various kinds (event, metric, trace) to the Application Insights service where they can be visualized in the Azure Portal.

Requirements

Install

go get github.com/Microsoft/ApplicationInsights-Go/appinsights

Get an instrumentation key

Note: an instrumentation key is required before any data can be sent. Please see the "Getting an Application Insights Instrumentation Key" section of the wiki for more information. To try the SDK without an instrumentation key, set the instrumentationKey config value to a non-empty string.

Usage

import "github.com/Microsoft/ApplicationInsights-Go/appinsights"

client := appinsights.NewTelemetryClient("<instrumentation key>")
client.TrackEvent("custom event")
client.TrackMetric("custom metric", 123)
client.TrackTrace("trace message")

telpad test and example app

The telpad app can be used to send test telemetry and as an example of using the SDK.

cd src/github.com/Microsoft/ApplicationInsights-Go
go install

telpad

Directories

Path Synopsis
Package appinsights provides an interface to submit telemetry to Application Insights.
Package appinsights provides an interface to submit telemetry to Application Insights.

Jump to

Keyboard shortcuts

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