From a252d137242fccda67e8a83fef853ca351e77861 Mon Sep 17 00:00:00 2001 From: Ethan <39577870+ethanndickson@users.noreply.github.com> Date: Wed, 15 Jan 2025 20:51:32 +1100 Subject: [PATCH] chore: exclude otlp trace provider from slim builds (#16140) This adds a build flag to `exporter.go` in `coderd/tracing` that skips compiling the file in slim builds. This file brings in some relatively hefty dependencies that were growing the size of the slim binary a few megabytes. All files that import `exporter.go` also aren't included in slim builds, so this is safe. We end up saving 5.4MB on the Linux slim binary. --- coderd/tracing/exporter.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coderd/tracing/exporter.go b/coderd/tracing/exporter.go index 37b50f09cf..29ebafd6e3 100644 --- a/coderd/tracing/exporter.go +++ b/coderd/tracing/exporter.go @@ -1,3 +1,5 @@ +//go:build !slim + package tracing import (