feat(scripts/metricsdocgen): add promauto.With() pattern to metrics scanner - #21463
Merged
ssncferreira merged 2 commits intoFeb 13, 2026
Merged
Conversation
This was referenced Jan 8, 2026
Contributor
Author
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-opts
branch
from
January 8, 2026 21:22
ee2942e to
b0e8dc4
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
from
January 8, 2026 21:22
109a46e to
403a3c5
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-opts
branch
from
January 9, 2026 08:51
b0e8dc4 to
c4b0acc
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
2 times, most recently
from
January 9, 2026 08:52
65a7c50 to
c64eacf
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-opts
branch
from
January 9, 2026 08:52
c4b0acc to
0243d78
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
from
January 9, 2026 09:29
c64eacf to
debcf77
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-opts
branch
from
January 9, 2026 09:29
0243d78 to
11d9828
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
from
January 9, 2026 09:42
debcf77 to
dac0195
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-opts
branch
2 times, most recently
from
January 9, 2026 09:47
602f312 to
ca16038
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
2 times, most recently
from
January 9, 2026 10:04
b53a4eb to
556e481
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-opts
branch
from
January 9, 2026 10:37
ca16038 to
8bc9baa
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
from
January 9, 2026 10:37
556e481 to
7f37f96
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-opts
branch
from
January 9, 2026 10:38
8bc9baa to
7c7892d
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
from
January 9, 2026 10:38
7f37f96 to
519ac0a
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-opts
branch
from
January 9, 2026 10:39
7c7892d to
8fc6317
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
2 times, most recently
from
January 9, 2026 10:40
f251035 to
da49da0
Compare
ssncferreira
marked this pull request as ready for review
January 9, 2026 11:32
mtojek
approved these changes
Jan 9, 2026
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-opts
branch
from
February 12, 2026 15:57
a94b964 to
cd66231
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
2 times, most recently
from
February 12, 2026 16:52
73c9730 to
aff890a
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-opts
branch
from
February 12, 2026 16:52
cd66231 to
13618b3
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
from
February 12, 2026 16:58
aff890a to
7930e63
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-opts
branch
from
February 12, 2026 16:58
13618b3 to
143e11f
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
from
February 12, 2026 17:22
7930e63 to
54a6a80
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-opts
branch
2 times, most recently
from
February 12, 2026 17:23
2463ea5 to
89e829c
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
from
February 12, 2026 17:23
54a6a80 to
23d403e
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-opts
branch
from
February 12, 2026 17:54
89e829c to
1b7cbe5
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
from
February 12, 2026 17:54
23d403e to
10d83e9
Compare
Contributor
Documentation CheckUpdates Needed
This PR improves the metrics scanner to detect Dependency: This PR depends on #21464 which adds the merging functionality. Metrics still missing from docs (click to expand)These metrics are now in
Note: Some metrics (API, OAuth2, provisioner, workspace) are already documented because they were previously in the static Automated review via Coder Tasks |
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
from
February 12, 2026 18:33
10d83e9 to
0c10e4e
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-opts
branch
from
February 12, 2026 18:41
14771de to
5f74a61
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
2 times, most recently
from
February 12, 2026 18:43
d9d6977 to
ca4d6a7
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-opts
branch
2 times, most recently
from
February 13, 2026 10:20
c110fa1 to
9832bc8
Compare
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
from
February 13, 2026 10:20
b35a400 to
c7d424c
Compare
mtojek
approved these changes
Feb 13, 2026
Contributor
Author
Merge activity
|
ssncferreira
changed the base branch from
ssncferreira/metricsdocgen-ast-scanner-opts
to
graphite-base/21463
February 13, 2026 11:02
ssncferreira
force-pushed
the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
from
February 13, 2026 11:14
c7d424c to
3a022d4
Compare
ssncferreira
deleted the
ssncferreira/metricsdocgen-ast-scanner-promauto
branch
February 13, 2026 11:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This PR implements extraction of metrics defined using
promauto.With()factory patterns.Changes
extractPromautoMetric()to handle:promauto.With(reg).NewCounterVec(prometheus.CounterOpts{...}, labels)factory.NewGaugeVec(prometheus.GaugeOpts{...}, labels)scripts/metricsdocgen/generated_metricsfileRelated to: #13223
Disclosure: This PR was mainly developed with Claude Sonnet 4, with iterative review and refinement by @ssncferreira