feat(pkg): add go-import page for metrics/exporters/gcp - #226
Merged
Merged
Conversation
`gofr.dev/pkg/gofr/metrics/exporters/gcp` is its own Go module, but the
vanity path served no go-import meta tag, so resolution failed with 404
before the module's tags were ever consulted:
$ curl -s -o /dev/null -w '%{http_code}\n' \
'https://gofr.dev/pkg/gofr/metrics/exporters/gcp?go-get=1'
404
Every route under src/app/pkg is hand-written, and the tree only covered
pkg/gofr/datasource/*. The metrics tree was never added, so no exporter
submodule could be fetched from outside the repo.
Same shape as #222 (cloudsql, influxdb, kv-store/dynamodb): a layout.jsx
carrying the go-import/go-source metadata and a PkgRedirect page. The
layout is byte-identical to the existing datasource ones; the page points
at /docs/references/configs, which is where METRICS_EXPORTER=gcp is
actually documented.
Unblocks gofr-dev/gofr#4112. The module tag still has to be cut
separately on the gofr repo.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Adds the missing vanity-import route for
gofr.dev/pkg/gofr/metrics/exporters/gcp.Why
That path is its own Go module in the gofr repo, but it cannot be fetched from outside the repository — the vanity server returns 404 with no
go-importmeta tag, so resolution fails before the module's tags are ever consulted:Every route under
src/app/pkgis hand-written, and the tree only ever coveredpkg/gofr/datasource/*. Themetricstree does not exist at all, so/pkg/gofr/metrics,/pkg/gofr/metrics/exportersand the module path itself all 404.Approach
Identical to #222 (cloudsql, influxdb, kv-store/dynamodb) and #205 (azure):
layout.jsx— carries thego-import/go-sourcemetadata. Byte-identical to the existing datasource layouts (verified withdiffagainstcloudsql/layout.jsx).page.jsx— aPkgRedirectpage, so the route actually renders and returns 200. Alayout.jsxon its own is not a route in the App Router and would still 404.docsPathpoints at/docs/references/configs, which is whereMETRICS_EXPORTER=gcpis documented. The custom-metrics guide does not mention the exporter.Verification
Structural clone of a pattern already deployed and working; I did not run a local
next build(theprebuildstep makes live GitHub calls). Post-merge check:Note — this is one half of the fix
Ref gofr-dev/gofr#4112. The module has also never been tagged: the batch of 26 submodule tags was cut at
285d3d2ec(the merge of gofr#3928, the PR that fixed this exporter'sgo.mod) and coveredpkg/gofr/datasource/*only.This PR must land and deploy first — a tag is useless while the meta lookup 404s. The tag
pkg/gofr/metrics/exporters/gcp/v0.1.0then needs pushing on the gofr repo separately.