instrgen

package module
v0.0.0-...-fed6e67 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

README

OpenTelemetry Go Source Automatic Instrumentation

This package provides a code generation utility that instruments existing source code with OpenTelemetry. If you are looking for more details about internal working, see How it works.

Project Status

🚧 This package is currently work in progress.

How to use it

In order to instrument your project you have to add following call in your entry point function, usually main (you can look at testdata directory for reference) and invoke instrgen tool.

func main() {
    rtlib.AutotelEntryPoint()

Instrgen requires three parameters: command, path to project and package(s) pattern we would like to instrument.

./instrgen --inject [path to your go project] [package(s) pattern]

Below concrete example with one of test instrumentation that is part of the project.

./instrgen --inject ./testdata/basic ./...

./... works like wildcard in this case and it will instrument all packages in this path, but it can be invoked with specific package as well.

Compatibility

The instrgen utility is based on the Go standard library and is platform agnostic.

Documentation

Overview

Package instrgen provides a code generation utility that instruments existing source code with OpenTelemetry.

Directories

Path Synopsis
driver module

Jump to

Keyboard shortcuts

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