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.
This commit is contained in:
Ethan
2025-01-15 20:51:32 +11:00
committed by GitHub
parent 2413106f22
commit a252d13724
+2
View File
@@ -1,3 +1,5 @@
//go:build !slim
package tracing
import (