Skip to content

Conversation

@grambbledook
Copy link
Member

@grambbledook grambbledook commented Dec 17, 2025

This pr adds a basic otel instrumentation to go-cache-plugin

# Setup env variable for tracing
export GOCACHE_ENABLE_TRACING=true  
export GOCACHE_TRACING_OTEL_COLLECTOR="localhost:4319" 

# Or Use RUN_xxx env variables to  compute trace and parent span ids
export TRACING_TRACE_ID="cfe93a0cde6f53f539e0eaff28e05ef4" 
export TRACING_PARENT_SPAN_ID="7e173813d01cc668" 

# setup local cache 
export GOCACHE_LOCAL_ONLY=true
export GOCACHE_DIR=/tmp/gocache
export GOCACHE_MODPROXY_NOCACHE=true

# start go cache process
go-cache-plugin serve --plugin 5930 --http=localhost:5970 --modproxy \
--local-cache --cache-dir=/tmp/gocache

# Set up go mod proxy and gocacheprog tool to intercept requests and report traces
export GOPROXY=http://localhost:5970/mod  
export GOCACHEPROG="./go-cache-plugin connect 5930" 

# Execute grafana build
make build-go

@grambbledook grambbledook requested review from a team as code owners December 17, 2025 14:40
@grambbledook grambbledook force-pushed the grambbledook/local-cache-and-metrics branch from e5806c8 to d24dfb3 Compare December 17, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant