Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
21b8724
chore: migrate to flint v2
zeitlinger Apr 9, 2026
c50ce18
chore: refresh flint v2 migration
zeitlinger Apr 21, 2026
1245a13
chore: switch flint migration to v0.20.3
zeitlinger Apr 21, 2026
eb32f85
ci: normalize flint init output
zeitlinger Apr 21, 2026
789033d
Merge origin/main into flint-v2-migration
zeitlinger Apr 21, 2026
7a79495
chore: drop pre-commit lint wrapper
zeitlinger Apr 21, 2026
a3d7bec
chore: clarify tool grouping
zeitlinger Apr 21, 2026
82a6c86
chore: separate tools from linters
zeitlinger Apr 21, 2026
74973ff
chore: let flint own go linting
zeitlinger Apr 21, 2026
ecfbd71
chore: group flint with linters
zeitlinger Apr 21, 2026
2da1cc5
chore: drop redundant tools heading
zeitlinger Apr 21, 2026
f86ae8c
chore: tighten mise tool spacing
zeitlinger Apr 21, 2026
38410b1
chore: drop pre-commit setup task
zeitlinger Apr 21, 2026
ccb55c1
chore: add editorconfig line length
zeitlinger Apr 21, 2026
2871472
chore: drop redundant generated file exclude
zeitlinger Apr 21, 2026
6dbdfc1
ci: keep biome config out of prettier
zeitlinger Apr 22, 2026
5eee51c
style: normalize flint config formatting
zeitlinger Apr 22, 2026
497fffc
chore: avoid global editorconfig line length
zeitlinger Apr 23, 2026
68d90e4
Merge origin/main into flint-v2-migration
zeitlinger Apr 23, 2026
d115f91
chore: update flint to 0.20.4
zeitlinger Apr 23, 2026
b47211b
fix: remove legacy markdownlint tool pin
zeitlinger Apr 23, 2026
fe1d2eb
fix: add flint-managed linter configs
zeitlinger Apr 23, 2026
f4a3067
fix: finish rust-native formatter cutover
zeitlinger Apr 23, 2026
df7801f
chore: keep flint config under config dir
zeitlinger Apr 23, 2026
15bd760
chore: rerun flint setup with current preflight
zeitlinger Apr 26, 2026
b912388
chore: refresh tracked deps ordering
zeitlinger Apr 26, 2026
665ca84
chore: update flint to v0.21.0
zeitlinger Apr 27, 2026
c9d6a91
Merge remote-tracking branch 'origin/main' into pr267-rerun
zeitlinger Apr 27, 2026
f2a9a58
chore: remove lint pre-commit task
zeitlinger Apr 27, 2026
0a313c3
chore: clarify yamllint ownership
zeitlinger Apr 27, 2026
7adc850
chore: drop default MD060
zeitlinger Apr 27, 2026
e5fe176
docs: drop flint v2 wording
zeitlinger Apr 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_size = 2
max_line_length = 120

[*.py]
indent_size = 4

[*.md]
# Markdown line length is handled by rumdl
max_line_length = off
5 changes: 5 additions & 0 deletions .github/config/.rumdl.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[MD013]
enabled = true
line-length = 120
code-blocks = false
tables = false
3 changes: 3 additions & 0 deletions .github/config/.taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[formatting]
column_width = 120
indent_string = " "
8 changes: 8 additions & 0 deletions .github/config/.yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: relaxed

rules:
document-start: disable
# Line length is owned by the repo's root .editorconfig.
line-length: disable
# Keep indentation checks in yamllint so YAML structure issues still fail lint.
indentation: enable
6 changes: 6 additions & 0 deletions .github/config/flint.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[settings]
# Generated or JSONC files flint should ignore.
exclude = [".vscode/launch.json", "**/supported-libraries.yaml"]

[checks.renovate-deps]
exclude_managers = ["github-actions", "github-runners"]
2 changes: 1 addition & 1 deletion .github/config/lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ include_fragments = true

exclude = [
# Google Docs links are often rate-limited
"https://docs.google.com/.*"
"https://docs.google.com/.*",
]
30 changes: 0 additions & 30 deletions .github/config/super-linter.env

This file was deleted.

15 changes: 11 additions & 4 deletions .github/renovate-tracked-deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,23 @@
},
"mise.toml": {
"mise": [
"actionlint",
"aqua:owenlamont/ryl",
"biome",
"editorconfig-checker",
"github:grafana/flint",
"github:koalaman/shellcheck",
"go",
"golangci-lint",
"lychee",
"node",
"npm:renovate",
"pipx:codespell",
"ruff",
"rumdl",
"shfmt",
"taplo",
"uv"
],
"regex": [
"ghcr.io/super-linter/super-linter",
"grafana/flint"
]
}
}
2 changes: 1 addition & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
extends: [
"config:best-practices",
"config:recommended",
"github>grafana/flint",
"github>grafana/flint#v0.21.0",
],
automerge: true,
labels: ["dependencies"],
Expand Down
23 changes: 12 additions & 11 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,14 @@ mise run generate

```bash
# Auto-fix and verify (recommended dev workflow)
mise run fix
mise run lint:fix

# Verify only (same command used in CI)
mise run lint

# Go linting only
mise run lint:go

# Format Go code
mise run fmt
```

Lint tasks are sourced from [grafana/flint](https://github.com/grafana/flint).
Linting is powered by [grafana/flint](https://github.com/grafana/flint).

## Architecture

Expand All @@ -54,7 +49,9 @@ Lint tasks are sourced from [grafana/flint](https://github.com/grafana/flint).
- **`main.go`** — Entry point. Parses CLI args, runs checks, optional web server on `:8080`
- **`checks/checks.go`** — Orchestrator: always runs env checks first, then routes to component-specific checkers
- **`checks/env/`** — Common OTel environment variable validation
- **`checks/sdk/`** — Language-specific SDK checkers, each in its own subpackage (`go/`, `js/`, `java/`, `python/`, `dotnet/`, `rubyChecker.go`, `phpChecker.go`)
- **`checks/sdk/`** — Language-specific SDK checkers, each in its own
subpackage (`go/`, `js/`, `java/`, `python/`, `dotnet/`,
`rubyChecker.go`, `phpChecker.go`)
- **`checks/sdk/supported/`** — Shared library support checking logic
- **`checks/collector/`** — OTel Collector YAML config validation
- **`checks/beyla/`** — Beyla-specific checks
Expand All @@ -66,8 +63,11 @@ Lint tasks are sourced from [grafana/flint](https://github.com/grafana/flint).

### Key Patterns

- **Reporter pattern**: `ComponentReporter` accumulates checks/warnings/errors, `Reporter` aggregates multiple component reporters
- **Generated files**: `supported-libraries.yaml` files in `checks/sdk/go/` and `checks/sdk/js/` — regenerate via `mise run generate`, don't edit manually
- **Reporter pattern**: `ComponentReporter` accumulates checks/warnings/errors,
`Reporter` aggregates multiple component reporters
- **Generated files**: `supported-libraries.yaml` files in `checks/sdk/go/`
and `checks/sdk/js/` — regenerate via `mise run generate`, don't edit
manually
- **Embedded resources**: Static files and templates use `//go:embed`

## CLI Usage
Expand Down Expand Up @@ -97,5 +97,6 @@ otel-checker -language=python -components=sdk,grafana-cloud -web-server
## CI

- `mise run check` (lint + test) on PRs
- Linting via flint (super-linter, lychee, golangci-lint)
- Linting via flint (shellcheck, shfmt, prettier, markdownlint,
codespell, actionlint, editorconfig, lychee, renovate-deps, gofmt)
- Python scripts use uv for dependencies
42 changes: 24 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
# Contributing to otel-checker

Thank you for your interest in contributing to otel-checker! This document provides guidelines and instructions for contributing to this project.
Thank you for your interest in contributing to otel-checker! This document
provides guidelines and instructions for contributing to this project.

## Development Environment Setup

1. Ensure you have Go installed (1.24 or higher)
2. Clone the repository:

```bash
git clone https://github.com/yourusername/otel-checker.git
cd otel-checker
```

3. Install dependencies:

```bash
go mod download
```
Expand All @@ -24,13 +28,13 @@ Thank you for your interest in contributing to otel-checker! This document provi
/Users/maryliag/go
```

2. Clone this repo in the go path folder, so you will have:
1. Clone this repo in the go path folder, so you will have:

```text
/Users/maryliag/go/src/otel-checker
```

3. Run
1. Run

```bash
go run main.go
Expand All @@ -44,20 +48,20 @@ go run main.go
go build
```

2. Install
1. Install

```bash
go install
```

3. You can confirm it was installed with:
1. You can confirm it was installed with:

```bash
❯ ls $GOPATH/bin
otel-checker
```

4. Use from any other directory
1. Use from any other directory

```bash
otel-checker \
Expand All @@ -75,26 +79,28 @@ go run otel-checker \

## Using mise

We provide a `mise.toml` file with several useful commands to simplify common development tasks. [mise](https://mise.jdx.dev/) helps ensure consistent code quality and streamlines the development workflow.
We provide a `mise.toml` file with several useful commands to simplify common
development tasks. [mise](https://mise.jdx.dev/) helps ensure consistent code
quality and streamlines the development workflow.

### Available mise Commands

| Command | Description |
| ---------------- | ----------------------------------------------- |
| `mise run build` | Builds the application using `go install` |
| `mise run test` | Runs all tests in the project |
| `mise run clean` | Removes build artifacts and cleans the Go cache |
| `mise run fmt` | Formats all Go code using `gofmt` |
| `mise run lint` | Lints the code using `golangci-lint` |
| `mise run check` | Run all checks (test and lint) |
| `mise run deps` | Updates dependencies using `go mod tidy` |
| Command | Description |
| ------------------- | ----------------------------------------------- |
| `mise run build` | Builds the application using `go install` |
| `mise run test` | Runs all tests in the project |
| `mise run clean` | Removes build artifacts and cleans the Go cache |
| `mise run lint:fix` | Auto-fix lint and formatting issues |
| `mise run lint` | Run all lints |
| `mise run check` | Run all checks (test and lint) |
| `mise run deps` | Updates dependencies using `go mod tidy` |

## Contribution Workflow

1. Create a fork of the repository
2. Create a new branch for your feature or bug fix
3. Make your changes
4. Run `mise run fmt` to format your code
4. Run `mise run lint:fix` to format your code
5. Run `mise run lint` to ensure code quality
6. Run `mise run test` to make sure all tests pass
7. Commit your changes with a descriptive message
Expand All @@ -106,7 +112,7 @@ Please ensure:

1. Your code follows the project's style and conventions
2. All tests pass (`mise run test`)
3. Code is properly formatted (`mise run fmt`)
3. Code is properly formatted (`mise run lint:fix`)
4. Linting passes without issues (`mise run lint`)

## Code Review Process
Expand Down
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# OTel Me If It's Right

Checker for if the implementation of OpenTelemetry instrumentation is correct by scanning the code in your repository, checking environment variables, validating your Grafana token and more.
Checker for if the implementation of OpenTelemetry instrumentation is correct
by scanning the code in your repository, checking environment variables,
validating your Grafana token and more.

## Usage

Expand Down Expand Up @@ -69,7 +71,10 @@ These checks are automatically performed for all languages and components.
- `service.instance.id` (e.g., `checkout-123`)
- `service.version` (e.g., `1.2`)
- For missing attributes, provides specific recommendations with example values
- Follows the [OpenTelemetry specification](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/) for precedence (e.g., `OTEL_SERVICE_NAME` takes precedence over `service.name` in `OTEL_RESOURCE_ATTRIBUTES`)
- Follows the
[OpenTelemetry specification](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/)
for precedence (e.g., `OTEL_SERVICE_NAME` takes precedence over
`service.name` in `OTEL_RESOURCE_ATTRIBUTES`)
- Example warning: `Set OTEL_RESOURCE_ATTRIBUTES="service.namespace=shop": An optional namespace for service.name`

### Grafana Cloud
Expand Down Expand Up @@ -116,10 +121,13 @@ Use `-components=sdk -language=dotnet` flag to check the following:
Use `-components=sdk -language=java` flag to check the following:

- Java version
- Prints which libraries (as discovered from a locally running maven or gradle) are supported:
- Prints which libraries (as discovered from a locally running maven or gradle)
are supported:
- With `-manual-instrumentation`, the libraries for manual instrumentation are printed.
- Without `-manual-instrumentation`, it will print the libraries supported by the [Java Agent](https://github.com/open-telemetry/opentelemetry-java-instrumentation/).
- A maven or gradle wrapper will be used if found in the current directory or a parent directory.
- Without `-manual-instrumentation`, it will print the libraries supported by
the [Java Agent](https://github.com/open-telemetry/opentelemetry-java-instrumentation/).
- A maven or gradle wrapper will be used if found in the current directory or
a parent directory.

#### Go

Expand Down
7 changes: 7 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// Keep JSON formatting aligned with the repo's two-space style.
"formatter": {
"indentStyle": "space",
"indentWidth": 2
}
}
16 changes: 12 additions & 4 deletions checks/sdk/go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ This directory contains the configuration and checker for Go libraries that can

## Supported Libraries File

The `supported-libraries.yaml` file contains information about which Go libraries are supported by OpenTelemetry instrumentation, along with their version ranges and source paths.
The `supported-libraries.yaml` file contains information about which Go
libraries are supported by OpenTelemetry instrumentation, along with their
version ranges and source paths.

### File Format

Expand Down Expand Up @@ -32,12 +34,15 @@ go.mongodb.org/mongo-driver:

## Generating the File

The `supported-libraries.yaml` file is generated from the OpenTelemetry Go Contrib repository using the `generate_go_supported_libraries.py` script.
The `supported-libraries.yaml` file is generated from the OpenTelemetry Go
Contrib repository using the `generate_go_supported_libraries.py` script.

### Prerequisites

- [Mise](https://mise.jdx.dev/)
- A local clone of the [OpenTelemetry Go Contrib repository](https://github.com/open-telemetry/opentelemetry-go-contrib) in a sibling directory to this repository.
- A local clone of the
[OpenTelemetry Go Contrib repository](https://github.com/open-telemetry/opentelemetry-go-contrib)
in a sibling directory to this repository.

### Usage

Expand Down Expand Up @@ -71,7 +76,10 @@ To update the file:

## Implementation Details

The Go checker scans `go.mod` files in your project to identify dependencies and compares them against the supported libraries list. It checks whether your dependencies are supported by OpenTelemetry instrumentation and reports any unsupported or out-of-range versions.
The Go checker scans `go.mod` files in your project to identify dependencies
and compares them against the supported libraries list. It checks whether your
dependencies are supported by OpenTelemetry instrumentation and reports any
unsupported or out-of-range versions.

## Version Range Format

Expand Down
11 changes: 8 additions & 3 deletions checks/sdk/js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ This directory contains the configuration for supported JavaScript libraries tha

## Supported Libraries File

The `supported-libraries.yaml` file contains information about which JavaScript libraries are supported by OpenTelemetry instrumentation, along with their version ranges and source paths.
The `supported-libraries.yaml` file contains information about which
JavaScript libraries are supported by OpenTelemetry instrumentation, along with
their version ranges and source paths.

### File Format

Expand All @@ -30,12 +32,15 @@ amqplib:

## Generating the File

The `supported-libraries.yaml` file is generated from the OpenTelemetry JS Contrib repository using the `generate_js_supported_libraries.py` script.
The `supported-libraries.yaml` file is generated from the OpenTelemetry JS
Contrib repository using the `generate_js_supported_libraries.py` script.

### Prerequisites

- [Mise](https://mise.jdx.dev/)
- A local clone of the [OpenTelemetry JS Contrib repository](https://github.com/open-telemetry/opentelemetry-js-contrib) in a sibling directory to this repository.
- A local clone of the
[OpenTelemetry JS Contrib repository](https://github.com/open-telemetry/opentelemetry-js-contrib)
in a sibling directory to this repository.

### Usage

Expand Down
Loading
Loading