Giter VIP home page Giter VIP logo

opentelemetry-go's Introduction

OpenTelemetry-Go

Circle CI Docs Go Report Card Gitter

The Go OpenTelemetry client.

Installation

This repository includes multiple packages. The api package contains core data types, interfaces and no-op implementations that comprise the OpenTelemetry API following the specification. The sdk package is the reference implementation of the API.

Libraries that produce telemetry data should only depend on api and defer the choice of the SDK to the application developer. Applications may depend on sdk or another package that implements the API.

All packages are published to go.opentelemetry.io/otel and is the preferred location to import from.

Additional resources:

Quick Start

Below is a brief example of importing OpenTelemetry, initializing a tracer and creating some simple spans.

package main

import (
	"context"
	"log"

	"go.opentelemetry.io/otel/api/global"
	"go.opentelemetry.io/otel/exporters/stdout"
	sdktrace "go.opentelemetry.io/otel/sdk/trace"
)

func main() {
	pusher, err := stdout.InstallNewPipeline(nil, nil)
	if err != nil {
		log.Fatal(err)
	}
	defer pusher.Stop()

	tracer := global.Tracer("ex.com/basic")
	ctx, span := tracer.Start(context.Background(), "main")
	defer span.End()
	/* … */
}

See the API documentation for more detail, and the opentelemetry examples.

Compatible Exporters

See the Go packages depending upon sdk/export/trace and sdk/export/metric for a list of all exporters compatible with OpenTelemetry's Go SDK.

Compatible Libraries

See the opentelemetry-go-contrib repo for packages that facilitates instrumenting other useful Go libraries with opentelemetry-go for distributed tracing and monitoring.

Contributing

See the contributing file.

opentelemetry-go's People

Contributors

agneum avatar akvanhar avatar andrewhsu avatar aneurysm9 avatar bogdandrutu avatar clsung avatar dengliming avatar dependabot[bot] avatar djosephsen avatar dmathieu avatar evantorrie avatar ferhatelmas avatar freeformz avatar iredelmeier avatar jmacd avatar krnowak avatar lizthegrey avatar matej-g avatar mralias avatar oncilla avatar paivagustavo avatar rghetia avatar sergeykanzhelev avatar stefanprisca avatar tensorchen avatar thinkerou avatar vmihailenco avatar wingyplus avatar xsam avatar ymotongpoo avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.