SITOMETRY is an offline static analysis tool for OpenTelemetry Collector configuration.
Current release target: v0.1.0.
SITOMETRY analyzes a single OpenTelemetry Collector YAML file and reports the implemented first-priority static findings as stable text or JSON output.
The current implementation includes:
- single-file YAML loading
- intermediate model construction
- registry and reference binding
- first-priority rule evaluation (
STM001throughSTM007) - stable diagnostics
- terminal-friendly text output
- machine-friendly JSON output
- stable analyze exit codes
SITOMETRY does not currently provide:
- second-priority rules such as
STM008,STM009, orSTM010 - deep connector topology validation
- multi-file configuration support
- automatic fixes
- advanced filtering flags
STM001: pipeline references an undeclared receiverSTM002: pipeline references an undeclared processorSTM003: pipeline references an undeclared exporterSTM004: configuration is missingservice.pipelinesSTM005: declared receiver is unusedSTM006: declared processor is unusedSTM007: declared exporter is unused
See rule-ids.md for the current rule ID reference.
go build ./cmd/sitometry
go build -race ./cmd/sitometrygo vet ./...
golangci-lint run
go test ./...
go test -race ./...sitometry analyze testdata/realish/k8s-mixed-findings.yaml
sitometry analyze testdata/realish/local-multipipeline-valid.yaml --format json
Example command:
sitometry analyze testdata/realish/k8s-mixed-findings.yamlExample output:
Input: testdata/realish/k8s-mixed-findings.yaml
Diagnostics: 6
[ERROR] STM001 pipeline traces
Summary: Pipeline traces references receiver missing_receiver, but no matching declaration exists.
Location: testdata/realish/k8s-mixed-findings.yaml:36:25
Explanation: The receiver reference in slot receivers could not be resolved from the analyzed declarations.
Recommendation: Check whether receiver missing_receiver is misspelled, missing, or should be replaced with an existing receiver.
[ERROR] STM002 pipeline traces
Summary: Pipeline traces references processor missing_processor, but no matching declaration exists.
Location: testdata/realish/k8s-mixed-findings.yaml:37:36
Explanation: The processor reference in slot processors could not be resolved from the analyzed declarations.
Recommendation: Check whether processor missing_processor is misspelled, missing, or should be replaced with an existing processor.
Example command:
sitometry analyze testdata/realish/local-multipipeline-valid.yaml --format jsonExample output:
{
"input": "testdata/realish/local-multipipeline-valid.yaml",
"diagnostics_count": 0,
"severity_counts": {
"error": 0,
"warning": 0
},
"diagnostics": []
}0: analysis completed successfully and produced no error-level diagnostics1: analysis completed successfully and produced at least one error-level diagnostic2: analysis failed and did not complete normally
See exit-codes.md for the stable exit-code reference.
- fixtures.md
- limitations.md
- release-checklist.md
- pre-release-code-review.md
- release-notes-v0.1.0.md
- release-package.md
- task-12-report.md
Apache-2.0. See LICENSE.