orchestrion

command module
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

README

Orchestrion

User Documentation Project Documentation Latest Release GitHub go.mod Go version OpenSSF Scorecard

Automatic compile-time instrumentation of Go code.

Overview

Orchestrion processes Go source code at compilation time and automatically inserts instrumentation. This instrumentation is driven by the imports present in the orchestrion.tool.go file at the project's root.

[!IMPORTANT] Should you encounter issues or a bug when using orchestrion, please report it in the bug tracker.

For support & general questions, you are welcome to use GitHub discussions. You may also contact us privately via Datadog support.

Requirements

Orchestrion supports the two latest releases of Go, matching Go's official release policy. It may function correctly with older Go releases; but we will not be able to offer support for these if they don't.

In addition to this, Orchestrion only supports projects using Go modules.

Getting started

Information on how to get started quickly with orchestrion can be found on the user guide.

Datadog Tracer Integrations

Importing github.com/DataDog/dd-trace-go/v2 in the project root's orchestrion.tool.go file enables automatic instrumentation of all supported integrations, which are listed on the documentation site. You can cherry-pick which integrations are enabled by orchestrion by importing the desired integrations' package paths instead of importing the tracer's root module.

[!TIP] Orchestrion is a vendor-agnostic tool. By default, orchestrion pin enables Datadog's tracer integrations by importing github.com/DataDog/dd-trace-go/v2 in orchestrion.tool.go, but other vendors (such as OpenTelemetry) may provide alternate integrations that can be used instead.

Troubleshooting

If you run into issues when using orchestrion please make sure to collect all relevant details about your setup in order to help us identify (and ideally reproduce) the issue. The version of orchestrion (which can be obtained from orchestrion version) as well as of the go toolchain (from go version) are essential and must be provided with any bug report.

You can inspect everything Orchestrion is doing by adding the -work argument to your go build command; when doing so the build will emit a WORK= line pointing to a working directory that is retained after the build is finished. The contents of this directory contains all updated source code Orchestrion produced and additional metadata that can help diagnosing issues.

More information

Datadog's user guide for Orchestrion can be found on docs.datadoghq.com.

Orchestrion's project documentation can be found at datadoghq.dev/orchestrion; in particular:

  • the user guide provides information about available configuration, and how to customize the traces produced by your application;
  • the contributor guide provides more detailed information about how orchestrion works and how to contribute new instrumentation to it.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
_docs module
_tools module
internal
cmd
goflags
Package goflags allows parsing go command invocations and storing their flags in a CommandFlags structure.
Package goflags allows parsing go command invocations and storing their flags in a CommandFlags structure.
goflags/quoted
Package quoted provides string manipulation utilities.
Package quoted provides string manipulation utilities.
injector
Package injector provides a facility to inject code into go programs, either in source (intended to be checked in by the user) or at compilation time (via `-toolexec`).
Package injector provides a facility to inject code into go programs, either in source (intended to be checked in by the user) or at compilation time (via `-toolexec`).
injector/aspect/advice
Package advice provides implementations of the injector.Action interface for common AST changes.
Package advice provides implementations of the injector.Action interface for common AST changes.
injector/aspect/join
Package join provides implementations of the InjectionPoint interface for common injection points.
Package join provides implementations of the InjectionPoint interface for common injection points.
injector/config
Package config contains APIs used to work with injector configuration files, which are formed by FilenameOrchestrionToolGo and FilenameOrchestrionYML files.
Package config contains APIs used to work with injector configuration files, which are formed by FilenameOrchestrionToolGo and FilenameOrchestrionYML files.
integrations
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
pin
toolexec/importcfg
Package importcfg provides utilities to deal with files accepted by the Go toolchain commands as the `-importcfg` flag value.
Package importcfg provides utilities to deal with files accepted by the Go toolchain commands as the `-importcfg` flag value.
Package runtime provides the run-time API of orchestrion packages.
Package runtime provides the run-time API of orchestrion packages.
built
Package built provides information about how the current application has been built, if it has been built using orchestrion.
Package built provides information about how the current application has been built, if it has been built using orchestrion.
samples module