MCPcopy Index your code
hub / github.com/DataDog/orchestrion

github.com/DataDog/orchestrion @v1.11.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.11.0 ↗ · + Follow
1,451 symbols 4,349 edges 216 files 373 documented · 26% updated 1d agov1.11.0 · 2026-06-25★ 61015 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
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.

Extension points exported contracts — how you extend this code

Advice (Interface)
Advice is the interface abstracting actual AST changes performed by injections. [9 implementers]
internal/injector/aspect/advice/advice.go
Hashable (Interface)
(no doc) [29 implementers]
internal/fingerprint/fingerprint.go
Request (Interface)
(no doc) [5 implementers]
internal/jobserver/common/handler.go
Edit (Interface)
Edit represents an edition that can be made to a `go.mod` file via `go mod edit`. [2 implementers]
internal/gomod/gomod.go
Command (Interface)
Command represents a Go compilation command [1 implementers]
internal/toolexec/proxy/proxy.go
Option (FuncType)
(no doc)
internal/goproxy/proxy.go
Point (Interface)
Point is the interface that abstracts selection of nodes where to inject code. [10 implementers]
internal/injector/aspect/join/join.go
RequestHandler (FuncType)
RequestHandler is a function that processes a request of a given type, and returns a response or an error to be sent bac
internal/jobserver/common/handler.go

Core symbols most depended-on inside this repo

forNode
called by 109
internal/injector/aspect/advice/code/dot.go
Close
called by 78
internal/toolexec/proxy/proxy.go
newProxy
called by 61
internal/injector/aspect/advice/code/dot_ast.proxies.go
WriteFile
called by 57
internal/toolexec/importcfg/importcfg.go
Node
called by 51
internal/injector/aspect/context/context.go
String
called by 51
internal/toolexec/proxy/proxy.go
Error
called by 48
internal/injector/check.go
NewOrderedAdvice
called by 45
internal/injector/aspect/advice/order.go

Shape

Method 741
Function 459
Struct 196
TypeAlias 28
Interface 19
FuncType 8

Languages

Go100%

Modules by API surface

internal/injector/aspect/advice/code/dot_ast.proxies.go252 symbols
internal/injector/aspect/join/function.go73 symbols
internal/injector/aspect/advice/code/dot_function.go41 symbols
internal/injector/aspect/context/context.go37 symbols
internal/injector/aspect/join/package.go31 symbols
main_test.go22 symbols
internal/injector/aspect/join/struct.go21 symbols
internal/toolexec/proxy/proxy.go20 symbols
internal/injector/aspect/join/package_test.go18 symbols
internal/injector/aspect/advice/code/template_test.go18 symbols
internal/jobserver/nbt/nbt.go17 symbols
internal/injector/aspect/advice/order_test.go17 symbols

Datastores touched

collCollection · 1 repos
(mongodb)Database · 1 repos
database_nameDatabase · 1 repos

For agents

$ claude mcp add orchestrion \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact