Skip to content

otelcconfig

otelcconfig is an independent Go prototype exploring the mechanism proposed in OpenTelemetry Go Compile Instrumentation Issue #705. It is intended to provide implementation evidence and study architectural trade-offs. It is not an official or maintainer-approved OpenTelemetry component.

Declarative Configuration Toolkit for otelc (OpenTelemetry Go Compile Instrumentation).

CI License Go Reference Status

What this project is

otelcconfig explores how per-instrumentation behavior configuration could work for otelc:

behavior manifest (metadata.yaml)
        ↓
typed Go structs + defaults + JSON Schema + docs + env mappings
        ↓
user declarative YAML (instrumentation/development)
        ↓
env vars  >  config file  >  defaults
        ↓
typed runtime API consumed by instrumentation hooks

It is a standalone design-exploration prototype of the mechanism described in:

What this project is not

  • Not an official OpenTelemetry component
  • Not affiliated with or endorsed by the OpenTelemetry Go Compile Instrumentation SIG
  • Not a replacement for the RFC planned during the LFX mentorship
  • Not integrated into otelc's -toolexec compile-time rewriting pipeline
  • Not a selection mechanism (that belongs to otel.instrumentation.go / ADR-0005)

Module path: github.com/ADITYA-CODE-SOURCE/otelcconfig
Do not import this under go.opentelemetry.io/....

Problem

Today otelc can turn instrumentations on or off with:

OTEL_GO_ENABLED_INSTRUMENTATIONS=nethttp,grpc
OTEL_GO_DISABLED_INSTRUMENTATIONS=nethttp

There is no way to configure how an instrumentation behaves — capture specific HTTP headers, redact sensitive URL query parameters, or gate a semantic-convention migration. Issue #705 proposes adopting the OpenTelemetry declarative configuration instrumentation/development node and a Java-agent-style per-instrumentation manifest.

Status

Phase Release Status
0 — Foundation v0.1.1 Current
1 — Manifest + codegen v0.2.0 Planned
2 — Validate + resolve v0.3.0 Planned
3 — Typed runtime demo + RFC v0.4.0 Planned
4 — Static-analysis guard v0.5.0 Stretch

Phase 0 ships a professional skeleton, ADRs, architecture docs, CI, and a CLI that reports honest "not implemented" messages. No configuration or generation claims are made yet.

Resume status: Phase 0 is a public foundation, not a completed portfolio project. List otelcconfig as a substantial LFX project only after the Phase 3 typed-runtime demonstration and end-to-end tests are complete. Phase 1–2 may be listed as "in progress."

Quick start (Phase 0)

git clone https://github.com/ADITYA-CODE-SOURCE/otelcconfig.git
cd otelcconfig
make check
make build VERSION=v0.1.1
./otelcconfig version
go run ./cmd/otelcconfig --help

make check is intentionally non-mutating: it fails on unformatted sources or untidy module files instead of silently rewriting them. Run make fmt and make tidy explicitly when needed. make lint requires golangci-lint.

Planned CLI (later phases)

otelcconfig generate   # Phase 1 — generate types, defaults, schema, docs
otelcconfig validate   # Phase 2 — validate user YAML against generated schema
otelcconfig resolve    # Phase 2 — show final values and sources
otelcconfig explain    # Phase 2 — explain one option
otelcconfig catalog    # Phase 2 — list all options
otelcconfig bake       # Phase 3 — model build-time config embedding
otelcconfig guard      # Phase 4 — reject undeclared config access
otelcconfig diff       # Phase 4 — compare two configs

Architecture overview

See docs/architecture.md.

Key decisions are recorded as ADRs under docs/adr/:

  • ADR-0001 — Record architecture decisions
  • ADR-0002 — Adopt OTel declarative config node

Relationship to otelc

Concern Owned by Notes
What gets woven (selection) otelc otel.instrumentation.go / ADR-0005 Out of scope here
How it behaves (configuration) Issue #705 / this prototype Mechanism exploration
What telemetry is emitted otelc Weaver registry schemas/otelc/ Separate from behavior manifests

Non-goals

  • Frontend / UI
  • Inventing config keys outside the OTel declarative configuration model
  • Replacing otelc's Weaver emission registry
  • Direct patches to otelc's compiler pipeline in this repository

LFX application positioning

When this project reaches Phase 3, describe it accurately as:

An independent Go prototype exploring the mechanism proposed in otelc Issue #705, with manifest-driven generation, declarative validation, backward-compatible resolution, and typed runtime hooks.

Do not claim that this repository implements Issue #705 upstream, is accepted by OpenTelemetry maintainers, or is an official OpenTelemetry contribution. Upstream contributor status comes from accepted participation in the upstream project; owning this independent repository does not by itself make the author an OpenTelemetry contributor.

Contributing

See CONTRIBUTING.md. Small, well-tested pull requests are welcome. Please keep the independent-prototype positioning clear in any public discussion.

Security

See SECURITY.md.

License

Apache License 2.0

About

Independent Go prototype for declarative per-instrumentation configuration in otelc (explores OpenTelemetry Issue #705). Not an official OpenTelemetry component.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages