From 7c2fac4f8528b23db6f3f9798474221a31c3b091 Mon Sep 17 00:00:00 2001 From: Nick Ripley Date: Mon, 6 Oct 2025 13:42:09 -0400 Subject: [PATCH 1/3] Explain how to remove dependencies added by Orchestrion Orchestrion imports all available integrations by default so that users always get every integration we have without having to do more manual configuration. However, this adds lots of transitive dependencies. Some users are sensitive to this, e.g. if they have security scanner products which might flag dependencies their program doesn't actually use. Explain how to fine-tune which integrations Orchestrion imports. --- .../automatic_instrumentation/dd_libraries/go.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/content/en/tracing/trace_collection/automatic_instrumentation/dd_libraries/go.md b/content/en/tracing/trace_collection/automatic_instrumentation/dd_libraries/go.md index 2270445ffb93a..d50581c4a2c6c 100644 --- a/content/en/tracing/trace_collection/automatic_instrumentation/dd_libraries/go.md +++ b/content/en/tracing/trace_collection/automatic_instrumentation/dd_libraries/go.md @@ -235,6 +235,17 @@ You can use the [tracing library][4] in your Orchestrion-built application. This Your Orchestrion-built application includes [continuous profiler][12] instrumentation. To enable the profiler, set the environment variable `DD_PROFILING_ENABLED=true` at runtime. +#### Remove integrations + +You can remove integrations by modifying the imports in the `orchestrion.tool.go` file. +You might do this if you don't want an integration, +or if you want to reduce the number of transitive dependencies for integrations your program doesn't use. +By default, Orchestrion imports `github.com/DataDog/dd-trace-go/orchestrion/all/v2`, +which will import every library for which there is an Orchestrion integration. +You can replace this import with imports of only the integrations you want to use. +See [the tracer source code][17] for the list of supported integrations. +Note that if you do this, you will need to manually update `orchestrion.tool.go` in order to enable new integrations. + ### Troubleshooting To troubleshoot builds that `orchestrion` manages, see [Troubleshooting Go Compile-Time Instrumentation][13]. @@ -250,6 +261,7 @@ To troubleshoot builds that `orchestrion` manages, see [Troubleshooting Go Compi [14]: /getting_started/tagging/unified_service_tagging/ [15]: /security/application_security/exploit-prevention/ [16]: /tracing/trace_collection/library_config/go/#traces +[17]: https://github.com/DataDog/dd-trace-go/blob/main/orchestrion/all/orchestrion.tool.go {{% /tab %}} From 00f49e4955d6ae37b52b624d8201876f533b8fbe Mon Sep 17 00:00:00 2001 From: Nick Ripley Date: Mon, 6 Oct 2025 14:20:54 -0400 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Heston Hoffman --- .../automatic_instrumentation/dd_libraries/go.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/en/tracing/trace_collection/automatic_instrumentation/dd_libraries/go.md b/content/en/tracing/trace_collection/automatic_instrumentation/dd_libraries/go.md index d50581c4a2c6c..8870f088672a9 100644 --- a/content/en/tracing/trace_collection/automatic_instrumentation/dd_libraries/go.md +++ b/content/en/tracing/trace_collection/automatic_instrumentation/dd_libraries/go.md @@ -241,10 +241,11 @@ You can remove integrations by modifying the imports in the `orchestrion.tool.go You might do this if you don't want an integration, or if you want to reduce the number of transitive dependencies for integrations your program doesn't use. By default, Orchestrion imports `github.com/DataDog/dd-trace-go/orchestrion/all/v2`, -which will import every library for which there is an Orchestrion integration. +which imports every library for which there is an Orchestrion integration. You can replace this import with imports of only the integrations you want to use. See [the tracer source code][17] for the list of supported integrations. -Note that if you do this, you will need to manually update `orchestrion.tool.go` in order to enable new integrations. + +**Note**: If you choose to import specific integrations, you must manually update `orchestrion.tool.go` each time you want to add a new integration. ### Troubleshooting From b56d351fa87c4562c0b7abb29dece23834ba17ba Mon Sep 17 00:00:00 2001 From: Nick Ripley Date: Fri, 24 Oct 2025 08:42:28 -0400 Subject: [PATCH 3/3] Apply comment from Kemal --- .../automatic_instrumentation/dd_libraries/go.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/en/tracing/trace_collection/automatic_instrumentation/dd_libraries/go.md b/content/en/tracing/trace_collection/automatic_instrumentation/dd_libraries/go.md index 8870f088672a9..aaec2f4a6379a 100644 --- a/content/en/tracing/trace_collection/automatic_instrumentation/dd_libraries/go.md +++ b/content/en/tracing/trace_collection/automatic_instrumentation/dd_libraries/go.md @@ -238,6 +238,7 @@ To enable the profiler, set the environment variable `DD_PROFILING_ENABLED=true` #### Remove integrations You can remove integrations by modifying the imports in the `orchestrion.tool.go` file. +You can also create your own `orchestrion.tool.go` file before you run `orchestrion`. You might do this if you don't want an integration, or if you want to reduce the number of transitive dependencies for integrations your program doesn't use. By default, Orchestrion imports `github.com/DataDog/dd-trace-go/orchestrion/all/v2`,