Skip to content

feat(docker): compose stack, observability, MCP, OTel, and k6 tests - #4883

Draft
alex-dna-tech wants to merge 24 commits into
micro:masterfrom
alex-dna-tech:feat/examples-docker-compose
Draft

feat(docker): compose stack, observability, MCP, OTel, and k6 tests#4883
alex-dna-tech wants to merge 24 commits into
micro:masterfrom
alex-dna-tech:feat/examples-docker-compose

Conversation

@alex-dna-tech

@alex-dna-tech alex-dna-tech commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Squash-rebased 50 commits into 8 logically-grouped commits:

  1. feat(docker) — compose stack with NATS, examples container, micro-run, and config
  2. feat(web) — gateway admin auth, status, and agent chat
  3. feat(mcp) — service-discovery instructions and deduplicated tool-call pipeline
  4. feat(otel) — auto-instrument services and export traces to tempo
  5. feat(docker) — observability stack with grafana, tempo, alloy, and loki
  6. test(k6) — add load and stress tests with seeded data
  7. fix — concurrent map safety, schema slice types, run banner
  8. docs — reorganize repo agent instructions

102 files changed, +11,981 / -1,050 lines. Final state identical to pre-rebase branch.

@alex-dna-tech
alex-dna-tech marked this pull request as draft August 10, 2026 18:11
@alex-dna-tech
alex-dna-tech force-pushed the feat/examples-docker-compose branch from b0a1c7b to 3e2abca Compare August 12, 2026 08:58
@alex-dna-tech
alex-dna-tech force-pushed the feat/examples-docker-compose branch from 91ee2ad to 6ec7481 Compare August 26, 2026 08:01
@alex-dna-tech alex-dna-tech changed the title feat(compose): NATS-backed micro.mu example services in Docker feat(docker): compose stack, observability, MCP, OTel, and k6 tests Aug 26, 2026
go-redis/v9@v9.22.0 depends on go.uber.org/atomic transitively.
go mod tidy resolved the missing sum entry that broke govulncheck.
Split internal/otel into a lightweight facade (Init/Shutdown/Register)
and a public go-micro.dev/v6/otel backend that mounts the OTLP trace
exporter. Core packages keep calling the facade; with no backend linked
both calls no-op and the otel SDK, otlptracehttp, and grpc stay out of
the build. cmd/micro blank-imports the backend to keep CLI tracing.

Consumer probe: 494 -> 385 packages, stripped binary 20.1M -> 17.1M,
66 grpc packages -> 0, removing the largest hard import from core.
Move the mdns registry (registry/mdns_registry.go -> registry/mdns/) and
bbolt file store (store/file.go -> store/file/) into opt-in subpackages.
Core registry/store now default to zero-dependency memory implementations;
cmd/defaults (imported by the micro CLI) restores mdns discovery and
file-backed storage as the historical defaults.

Drops miekg/dns, bbolt, and grpc/examples (vendored helloworld test pb)
from library builds: probe drops 385->371 packages, 17.1M->15M stripped.

service/profile.LocalProfile and cmd.DefaultRegistries no longer hard-link
mdns; the CLI keeps it via cmd/defaults.
Services built the nats registry explicitly but left broker to flag
selection, so MICRO_BROKER=nats hit the unlinked-plugin error and fell
back to the http broker, which choked on the nats:// address. Add an
explicit nats broker to each service to match the registry pattern.
… core

Collapse 5 near-identical chat/stream/image HTTP clients (openai, groq,
mistral, together, minimax) into ai/internal/openaiapi. Single deep module
with one New(Config, opts...) entry point; provider divergences become
Config flags (UseMessages, ParseUsage, Path). Added ai.WithTransport
RoundTripper seam for hermetic tests. Checked upstream fixes: groq stream
honors SystemPrompt, stream body carry Authorization. Closes #14
Add server.BeforeHandler and server.AfterHandler, HandlerWrapper
constructors that run a func(context, Request) error before or after the
handler. Complements the existing start/stop hooks (service.BeforeStart,
AfterStart, BeforeStop, AfterStop), completing the before/after functions
for handler requests raised in issue #15.
Deduplicate the client and server rpcCodec copies (~650 lines) into a
single go-micro.dev/v6/internal/mucp module. Client and server shrink to
thin shims on One construction entry point (NewClient/NewServer), with
SetupProtocol(msg, node) merged legacy detection and Lookup/GetHeader
helpers. Wire bytes are unchanged: client writes plain Micro- headers,
server dual-writes plain + X-, legacy json-rpc/proto-rpc fallback and
grpc first-message preload preserved.

Adds the boundary test suite the protocol never had (round-trip, header
canonicalization, legacy rewrite, grpc preload, codec-write error,
error envelopes). Ports TestCodecWriteError from server, drops the old
readWriteCloser test helper.
Replaces micro-run monolith with per-service containers that each
connect to NATS for registry, broker, and transport. Adds env-driven
NATS config anchors, per-service Dockerfiles, OTLP export, and broker
event publishing in contacts. Grafana NATS panels updated.
…ker-compose

# Conflicts:
#	CHANGELOG.md
#	ai/gemini/gemini.go
#	ai/groq/groq.go
#	ai/minimax/minimax.go
#	ai/mistral/mistral.go
#	ai/openai/openai.go
#	ai/options.go
#	ai/together/together.go
Move k6 and k6-stress out of docker-compose profiles into Makefile
docker run commands, fixing compose networking issues with one-shot
test runs. Targets connect directly to gateway via host.docker.internal.
Prevents 26k% spike in Requests Δ prev when the previous window had
near-zero traffic at startup. Also picks up Grafana UI export churn:
use $__rate_interval for rate/increase windows, add editorMode flags,
streamline NATS thresholds, and add docker-compose run target.
Check fsnotify Add error in watcher, mark re-add as best-effort, and
correct British spellings (marshalled/optimised/catalogue). Skip live
provider stream check on 401/404 instead of failing when env holds a
stale credential or model id.

Closes lint issues reported by golangci-lint.
@alex-dna-tech
alex-dna-tech force-pushed the feat/examples-docker-compose branch from cbf1380 to 7c45213 Compare September 2, 2026 15:33
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