Microsoft Application Insights SDK for Go
Перейти к файлу
JJ Jordan 31e3db6fae Set to version 0.3.1 2017-12-05 21:16:55 +00:00
.vscode Remove extra comma. 2016-05-31 15:43:40 +09:00
appinsights Set to version 0.3.1 2017-12-05 21:16:55 +00:00
telpad Add test iKey. 2016-05-31 15:59:10 +09:00
vendor/code.cloudfoundry.org In-progress test work 2017-08-08 19:06:41 -07:00
.gitignore Ignore backup files 2017-08-23 09:55:09 +00:00
.gitmodules In-progress test work 2017-08-08 19:06:41 -07:00
.travis.yml travis: update go versions 2017-10-12 19:03:21 +02:00
CODE_OF_CONDUCT.md Add code of conduct, contributing guide, PR template, update copyright dates 2017-10-18 05:58:07 +00:00
CONTRIBUTING.md Add code of conduct, contributing guide, PR template, update copyright dates 2017-10-18 05:58:07 +00:00
LICENSE Add code of conduct, contributing guide, PR template, update copyright dates 2017-10-18 05:58:07 +00:00
PULL_REQUEST_TEMPLATE.md Rename PR template 2017-10-18 06:00:07 +00:00
README.md Fix obviously-wrong instructions in README (not really improved, however) 2017-08-26 05:20:13 +00:00

README.md

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