otelstarter

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: MIT Imports: 12 Imported by: 0

README

Otel GO Starter

A simple means of getting the Open Telemetry global instrumentation configure and started

Go Reference build results

Get Started

Using the Otel GO Starter allows for easy configuration of the global open telemetry instrumentations.

> go get github.com/MovieStoreGuy/otel-go-starter@latest

Then all that is required to do within main is the following:

package main

import (
    "context"

    otelstarter "github.com/MovieStoreGuy/otel-go-starter"
)

func main() {
    ctx, done := context.WithCancel(context.Background())
    defer done()

    defer otelstarter.Start(ctx).Shutdown()

    // Start the remainder of the application
}

Further Examples

To show working examples of working with otel go starter feel free to look at the examples folder on further ideas on how to get started.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Launcher

type Launcher interface {
	Shutdown()
}

Launcher stores all the information used from configuring the global Open Telemetry properties and allows for graceful shutdowns

func Start

func Start(ctx context.Context, opts ...config.OptionFunc) Launcher

Start configures the global context of the open telemetry functionality Any issues trying to configure any of the instrumentation will cause the method to panic

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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