Skip to content

Commit 7a6592e

Browse files
zepatrikory-bot
authored andcommitted
fix(hydra): use prometheus metrics instead of SQA metrics
GitOrigin-RevId: 2ca878d66e4ab101af51bc32f8606ce6c3af0587
1 parent fe735bb commit 7a6592e

File tree

6 files changed

+24
-166
lines changed

6 files changed

+24
-166
lines changed

CHANGELOG.md

Lines changed: 2 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
55
**Table of Contents**
66

7-
- [0.0.0 (2025-08-26)](#000-2025-08-26)
7+
- [0.0.0 (2025-07-03)](#000-2025-07-03)
88
- [Breaking Changes](#breaking-changes)
99
- [Related issue(s)](#related-issues)
1010

1111
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
1212

13-
# [0.0.0](https://github.com/ory/hydra/compare/v2.3.0...v0.0.0) (2025-08-26)
13+
# [0.0.0](https://github.com/ory/hydra/compare/v2.3.0...v0.0.0) (2025-07-03)
1414
## Breaking Changes
1515

1616
This patch changes the behavior of configuration item `foo` to do bar. To keep the existing
@@ -41,10 +41,6 @@ If this pull request
4141

4242
### Bug Fixes
4343

44-
* Add repo syncing for polis ([46d17f8](https://github.com/ory/hydra/commit/46d17f8bfdc59e2185e9ce65823eb2652e01f1b8)):
45-
46-
GitOrigin-RevId: e277a25d594b512b800d39dd18f36ea3d99fcf84
47-
4844
* Allow updating when JWKS URI is set ([#3935](https://github.com/ory/hydra/issues/3935)) ([#3946](https://github.com/ory/hydra/issues/3946)) ([fb1655b](https://github.com/ory/hydra/commit/fb1655ba86077b10141132ed332ba8d6f8c70582)):
4945

5046
The client validator no longer rejects PATCH and PUT updates when `JSONWebKeysURI` is non-empty and `JSONWebKeys` is not nil.
@@ -75,10 +71,6 @@ If this pull request
7571
GitOrigin-RevId: 61645585277edd95914705499afd7211a85983eb
7672

7773
* CLI usage help examples ([#3943](https://github.com/ory/hydra/issues/3943)) ([e24f9a7](https://github.com/ory/hydra/commit/e24f9a704c22c72690bc20c498439865181d9239))
78-
* Copybara script ([7b33358](https://github.com/ory/hydra/commit/7b333585bb44a069bf47267c853aa2e91db0efa3)):
79-
80-
GitOrigin-RevId: 14665e01451ac5fcdda148b473b8fc35d4fe21ef
81-
8274
* Correct multiple instances of 'stragegy' typo ([#3906](https://github.com/ory/hydra/issues/3906)) ([50eefbc](https://github.com/ory/hydra/commit/50eefbc21c2c43d221b6079bbd78a33ef8c754c4)):
8375

8476
This commit addresses several occurrences where 'strategy' was
@@ -88,22 +80,6 @@ If this pull request
8880
documentation repository (ory/docs), with a corresponding pull request
8981
submitted.
9082

91-
* Deduplicate down migrations ([02baf36](https://github.com/ory/hydra/commit/02baf364c5f1fe09a74edb879c711983f761dc7f)):
92-
93-
GitOrigin-RevId: 94c68daeded4f3b6f42d079d71415d8935a74e69
94-
95-
* **deps:** Update go-x ([582a3c5](https://github.com/ory/hydra/commit/582a3c5f2de833a7996812d4873b305d162e1c7b)):
96-
97-
GitOrigin-RevId: 2d32f7710b9c6111a30f4e0d3cc0abc967d7dfb6
98-
99-
* Failing CI in OSS repos ([c900985](https://github.com/ory/hydra/commit/c9009858dc96edbbec1dd256cb1a734beb4f90aa)):
100-
101-
GitOrigin-RevId: 3d1f84b0f0d006971aea9489322b3e0f32a6a7e3
102-
103-
* Fix expires_at timestamp not in UTC leading to local test failures ([337000a](https://github.com/ory/hydra/commit/337000aacd07a1af6e77918a011903b6f39701a3)):
104-
105-
GitOrigin-RevId: 560d958391b12ace6db9d4c05074719e96e0329e
106-
10783
* Force autocommit for device auth code migration ([#3991](https://github.com/ory/hydra/issues/3991)) ([29761f4](https://github.com/ory/hydra/commit/29761f4ac7586478ea6f553cb571ac11b0275e6d)), closes [#1234](https://github.com/ory/hydra/issues/1234) [#1234](https://github.com/ory/hydra/issues/1234):
10884

10985
<!--
@@ -117,34 +93,14 @@ If this pull request
11793

11894
```
11995

120-
* Hydra tracing ([38ee050](https://github.com/ory/hydra/commit/38ee050214499aa96b06dd6b0eb8d18ead9dcd32)):
121-
122-
GitOrigin-RevId: 44aeb79002934149b6889c4e13697aa178f3d614
123-
124-
* **hydra:** Instrument metrics also on public endpoints ([8aee364](https://github.com/ory/hydra/commit/8aee364805a0fa20cd5d786324efb5c6e5cdfcb5)):
125-
126-
GitOrigin-RevId: 84ae1df26bd3d9a025655e50792ea7312f250cca
127-
128-
* Identity queries ([a30f021](https://github.com/ory/hydra/commit/a30f021fd98969c2dbc31a4dc3e45365d60c1a25)):
129-
130-
GitOrigin-RevId: b103d25a807c643b521a12d593486d5125f390be
131-
13296
* Ignore flaky keys in Hydra HSM tests ([469b2ad](https://github.com/ory/hydra/commit/469b2ad538865a38738a10f46d270f53d12101ad)):
13397

13498
GitOrigin-RevId: 83312e6544bc33ccc30e1e1e414cc04910429192
13599

136-
* Include go.mod in vendored oryx ([08a3ab4](https://github.com/ory/hydra/commit/08a3ab43ddb1e2a0df430224f969fe3f0ba161bf)):
137-
138-
GitOrigin-RevId: 20365bbe6b2cf95ac7973bcca9056455d2cb3803
139-
140100
* **infrastructure:** Hydra oss CI ([e846541](https://github.com/ory/hydra/commit/e84654185cdfffbf160d5309f744795d15d723f9)):
141101

142102
GitOrigin-RevId: 3df0724e5ea4c81a0f4c481c1a3a34529356d073
143103

144-
* Jsonx.ApplyJSONPatch ([c6fa2a6](https://github.com/ory/hydra/commit/c6fa2a6f17f63e43cfecb576bd2a1c1b58c778ed)):
145-
146-
GitOrigin-RevId: 43c10801f5051e3d5fbea5f4f5e90394f6da0fbb
147-
148104
* JWT documentation link to point to the correct resource ([#3907](https://github.com/ory/hydra/issues/3907)) ([b746e41](https://github.com/ory/hydra/commit/b746e41eda6dc3fe376b147d146a6fcc7dafb455)):
149105

150106
The previous link in the documentation led to a page unrelated to JWT.
@@ -172,23 +128,7 @@ If this pull request
172128
persistence/sql/src/20220210000001_nid/20220210000001000000_nid.cockroach.up.sql
173129
```
174130

175-
* Otlp sampling rate default ([cbd5094](https://github.com/ory/hydra/commit/cbd50947ff7e03a4c32d0ad52acd55b595b393ce)):
176-
177-
GitOrigin-RevId: 8a01bded7d8eca0ac3a81de793286144aab16426
178-
179-
* Print correct content of down migrations ([4a4a088](https://github.com/ory/hydra/commit/4a4a0880dc6222870b1e177ce04f81842359f922)):
180-
181-
GitOrigin-RevId: 48b1efa8d3d4f6c6648d3941f67f622fdfb0075c
182-
183-
* Revert "fix: otlp sampling rate default ([#9055](https://github.com/ory/hydra/issues/9055))" ([02e86bc](https://github.com/ory/hydra/commit/02e86bc192c8f693c23aa430481a1e719d8e2e21)):
184-
185-
GitOrigin-RevId: 9de37a48b68c7ee29caefb01c83f1a78999dc15b
186-
187131
* Revoke by consent request ID ([#3947](https://github.com/ory/hydra/issues/3947)) ([5d8635c](https://github.com/ory/hydra/commit/5d8635c94389ff3c87bfae66afe95105c147bec1)), closes [#3932](https://github.com/ory/hydra/issues/3932) [#3932](https://github.com/ory/hydra/issues/3932) [#3941](https://github.com/ory/hydra/issues/3941)
188-
* Routes in AX with identity_schema ([5014348](https://github.com/ory/hydra/commit/50143483fd66fb7d545e8a8e2c7e95857f35fbbb)):
189-
190-
GitOrigin-RevId: ab72dc64c194c06bf0301e87aa829c72022ac41e
191-
192132
* Simplify and fix Copybara sync job ([f998d09](https://github.com/ory/hydra/commit/f998d090ca6408b05524aea5e5f3a79c5d44b1a4)):
193133

194134
GitOrigin-RevId: 115f1ba1aa8f92d9c546046b37d4fb27dacedec8
@@ -205,14 +145,6 @@ If this pull request
205145

206146
GitOrigin-RevId: 64950988a466bbdb4f25b8d9f5c416ff591c00bf
207147

208-
* Use hard-coded fallback key instead of panic ([e1f6450](https://github.com/ory/hydra/commit/e1f645012f43f62928fdc79710b45d935878367f)):
209-
210-
GitOrigin-RevId: d7a2270bbf5360288199e9632b2eac6cbc29737c
211-
212-
* Use main branch for polis ([6c24e68](https://github.com/ory/hydra/commit/6c24e68995b8eae9ba0b8872867270ef1d35113b)):
213-
214-
GitOrigin-RevId: 04533493184c6abdc3a211daffd98f6b68e1c9cc
215-
216148
* Using uuid_generate_v4 function ([#3958](https://github.com/ory/hydra/issues/3958)) ([c206066](https://github.com/ory/hydra/commit/c20606606654af975e5d82998956bb998acee576)):
217149

218150
Removing the md5 function for the uuid generation with native pgsql
@@ -221,19 +153,8 @@ If this pull request
221153
Closes https://github.com/ory/hydra/issues/3844
222154

223155

224-
### Code Refactoring
225-
226-
* Move database meta functions to root x folder for reusability ([7e49133](https://github.com/ory/hydra/commit/7e49133f435d6a0f74a63e8f8d03c5d314d7d3c6)):
227-
228-
GitOrigin-RevId: 30ee938ea5f1d19bac8967e0ebfe2d595ec27d2b
229-
230-
231156
### Features
232157

233-
* Add allowed domains configuration for captcha ([df3f05c](https://github.com/ory/hydra/commit/df3f05c6ffbd3f00e62a33b2b68416ccf2009112)):
234-
235-
GitOrigin-RevId: 03395362054593f07ff6405c2a747256b5ff528e
236-
237158
* Add error reason to OAuth2TokenExchangeError event ([#3971](https://github.com/ory/hydra/issues/3971)) ([241dd45](https://github.com/ory/hydra/commit/241dd45fa17ed10d1101d890199df47dab4dbce5))
238159
* Add handler for /.well-known/oauth-authorization-server. ([#3980](https://github.com/ory/hydra/issues/3980)) ([5baca28](https://github.com/ory/hydra/commit/5baca2843a98c222006b27b20e7e6392421ecad8)):
239160

@@ -244,10 +165,6 @@ If this pull request
244165
configuration items that conform to this endpoint as seen here:
245166
https://datatracker.ietf.org/doc/html/rfc8414
246167

247-
* Autoconfigure kratos-changefeed ([d92dabe](https://github.com/ory/hydra/commit/d92dabedf2f55d8b74f5898c987c3e6712fb0b16)):
248-
249-
GitOrigin-RevId: 8e684d3c1ed528798c0c81cc4330858c54a39acf
250-
251168
* **changelog-oel:** Add `hydra debug challenge` command ([a94662f](https://github.com/ory/hydra/commit/a94662f1edc49e662a5e1818dbfd4cac15bd9ead)):
252169

253170
GitOrigin-RevId: 793cf3327696465ea89fdfcf078f26594832a666
@@ -256,18 +173,10 @@ If this pull request
256173

257174
GitOrigin-RevId: 1a115d9e2055bbf9a0bb4ecf7c6a266b2b70a8cd
258175

259-
* **changelog-oel:** Choose identity schema in self-service registration and login flows ([a398b64](https://github.com/ory/hydra/commit/a398b6444bff9476b2768e9e5f840bcf73fff3a6)):
260-
261-
GitOrigin-RevId: 8d6ee03cc8181d3277100a4b7412a3a113799964
262-
263176
* **changelog:** Graceful refresh count limit ([470713d](https://github.com/ory/hydra/commit/470713da36862745ca0222c284e0692fa40559ae)):
264177

265178
GitOrigin-RevId: 7f8bf5fee8b06490f888590054d2dcd2f1cf2cba
266179

267-
* **changelog:** Migrate http router to stdlib router ([a147e3b](https://github.com/ory/hydra/commit/a147e3b64007a3c7b2c5dd0351321c1aa92d5b70)):
268-
269-
GitOrigin-RevId: ebd7ec330a4f7b9826cb70ba36ba2f727ea64c96
270-
271180
* Implement RFC 8628 ([#3912](https://github.com/ory/hydra/issues/3912)) ([5215d24](https://github.com/ory/hydra/commit/5215d2482adc6328f6ed78ac7799f1f5243d1e7f)), closes [#3851](https://github.com/ory/hydra/issues/3851) [#3252](https://github.com/ory/hydra/issues/3252) [#3230](https://github.com/ory/hydra/issues/3230) [#2416](https://github.com/ory/hydra/issues/2416):
272181

273182
This patch introduces the OAuth 2.0 Device Authorization Grant to Ory
@@ -318,10 +227,6 @@ If this pull request
318227

319228
GitOrigin-RevId: dbb48d171fad1f9b4fd31385f0ef4fb01e39e823
320229

321-
* Move config testhelpers to ory/x ([3a4ba08](https://github.com/ory/hydra/commit/3a4ba084c74cf49a521856f150a8a2c6f3c1aa25)):
322-
323-
GitOrigin-RevId: fd484445e9715760231f7f86ec212d094e826377
324-
325230
* Revoke Kratos session asynchronously ([#3936](https://github.com/ory/hydra/issues/3936)) ([a0e7ee2](https://github.com/ory/hydra/commit/a0e7ee29298d4f882a7d471e0601b01c6848c40d)):
326231

327232
This change makes the session revocation in Kratos async to improve
@@ -401,18 +306,10 @@ If this pull request
401306
POST admin/oauth2/auth/sessions/consent?consent_challenge_id=G_TIM3XABG14UwIgDoT1DRfipjhC1uix
402307
```
403308

404-
* Use stdlib HTTP router in Kratos ([8f81931](https://github.com/ory/hydra/commit/8f8193179a39dc142d502fbc559891ffa0385ed8)):
405-
406-
GitOrigin-RevId: 799513e99acbf43a05fe3113ffda45d2fff2a9e0
407-
408309
* Use vendored jackson ([a0a9062](https://github.com/ory/hydra/commit/a0a906211bce4ced3e1f4324eb9d287ef10892a6)):
409310

410311
GitOrigin-RevId: 591238768218ba2b5af93f91ac7e16f4c170da5b
411312

412-
* Use vendored ory/x ([6581e01](https://github.com/ory/hydra/commit/6581e01679b2e146433061cbaaebb80a0e3905b5)):
413-
414-
GitOrigin-RevId: 994f3b754946ca5b2bd1bab0fe20532f5d5ab62f
415-
416313

417314
### Performance Improvements
418315

@@ -423,43 +320,8 @@ If this pull request
423320

424321
### Tests
425322

426-
* Add golangci-lint config and GHA ([1209de7](https://github.com/ory/hydra/commit/1209de78736c6730fa84cbf4e7046535aeba094f)):
427-
428-
GitOrigin-RevId: eb14c9f38e2b98d11a78ee0b90fd8f4f689abd3d
429-
430-
* **hydra:** Add snapshots for login & consent requests ([687cfae](https://github.com/ory/hydra/commit/687cfae2092b90bcde11b0976b3f944bc8bb9a4a)):
431-
432-
GitOrigin-RevId: 47d041cf207af6c3e9e21bf3016e5ea0cf044344
433-
434-
* **hydra:** Clean oauth2 session setup ([699e382](https://github.com/ory/hydra/commit/699e38238220f857148b503dfb96d9b057bb4583)):
435-
436-
GitOrigin-RevId: e05097c7439096cf40fdcf059b3396970b2f1219
437-
438-
* **hydra:** Clean up some helpers ([7840b0e](https://github.com/ory/hydra/commit/7840b0e0aade3b8fac6f1677a75b192e9c094b23)):
439-
440-
GitOrigin-RevId: 2b93dfbc4c27602a6ad053ccd0f25962f600419f
441-
442-
* **hydra:** Convert custom JWT claim tests to table ([8391d1b](https://github.com/ory/hydra/commit/8391d1bc57a85420f50c2e0b856a509b6784963d)):
443-
444-
GitOrigin-RevId: c0114d299bdec370104e8ad0b3042d3a3c045bb1
445-
446-
* **hydra:** New and better e2e go tests ([aefe5e2](https://github.com/ory/hydra/commit/aefe5e2663608ec945dc49be466d48c0d43810f2)):
447-
448-
GitOrigin-RevId: 23a73e451286556fb6b0072c5b348eee137f1310
449-
450-
* **hydra:** Refactor consent handler tests ([4d61925](https://github.com/ory/hydra/commit/4d6192599dc4f1020e8c5418398c6a85820c74cb)):
451-
452-
GitOrigin-RevId: 77753f8e0018eaef2bc17b73d456de5b7b0585b1
453-
454323
* Parallelize and improve ([#3989](https://github.com/ory/hydra/issues/3989)) ([a47e395](https://github.com/ory/hydra/commit/a47e39513f1f08076849f77517977abffa195364))
455324

456-
### Unclassified
457-
458-
* Merge 3834fab8c161a7dc98d43f32acf8efd9e6e95352 into 4dae0f4a8785eb36d8dbb27137f6b924c1e0f0b5 ([dc84053](https://github.com/ory/hydra/commit/dc840535c19d58caf130966e00d3d2fe9f3eb577)):
459-
460-
GitOrigin-RevId: 0c2dcaa065b64d2aafbcfd49c79363a214c5b2aa
461-
462-
463325

464326
# [2.3.0](https://github.com/ory/hydra/compare/v2.2.0...v2.3.0) (2025-01-17)
465327

cmd/server/handler.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func RunServeAll(dOpts []driver.OptionsModifier) func(cmd *cobra.Command, args [
118118

119119
var prometheusManager = prometheusx.NewMetricsManagerWithPrefix("hydra", prometheusx.HTTPMetrics, config.Version, config.Commit, config.Date)
120120

121-
func adminServer(ctx context.Context, d *driver.RegistrySQL, metricsService *metricsx.Service) (func() error, error) {
121+
func adminServer(ctx context.Context, d *driver.RegistrySQL, sqaMetrics *metricsx.Service) (func() error, error) {
122122
cfg := d.Config().ServeAdmin(contextx.RootContext)
123123

124124
n := negroni.New()
@@ -155,7 +155,7 @@ func adminServer(ctx context.Context, d *driver.RegistrySQL, metricsService *met
155155
}
156156
cors.New(cfg).ServeHTTP(w, r, next)
157157
})
158-
n.Use(metricsService)
158+
n.Use(sqaMetrics)
159159

160160
router := httprouterx.NewRouterAdminWithPrefix(prometheusManager)
161161
d.RegisterAdminRoutes(router)
@@ -167,7 +167,7 @@ func adminServer(ctx context.Context, d *driver.RegistrySQL, metricsService *met
167167
}, nil
168168
}
169169

170-
func publicServer(ctx context.Context, d *driver.RegistrySQL, metricsService *metricsx.Service) (func() error, error) {
170+
func publicServer(ctx context.Context, d *driver.RegistrySQL, sqaMetrics *metricsx.Service) (func() error, error) {
171171
cfg := d.Config().ServePublic(contextx.RootContext)
172172

173173
n := negroni.New()
@@ -203,9 +203,9 @@ func publicServer(ctx context.Context, d *driver.RegistrySQL, metricsService *me
203203
}
204204
cors.New(cfg).ServeHTTP(w, r, next)
205205
})
206-
n.Use(metricsService)
206+
n.Use(sqaMetrics)
207207

208-
router := x.NewRouterPublic(metricsService)
208+
router := x.NewRouterPublic(prometheusManager)
209209
d.RegisterPublicRoutes(ctx, router)
210210

211211
n.UseHandler(router)

health/handler_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import (
99
"net/http/httptest"
1010
"testing"
1111

12-
"github.com/urfave/negroni"
13-
1412
"github.com/stretchr/testify/assert"
1513
"github.com/stretchr/testify/require"
1614

@@ -19,6 +17,7 @@ import (
1917
"github.com/ory/hydra/v2/x"
2018
"github.com/ory/x/configx"
2119
"github.com/ory/x/healthx"
20+
"github.com/ory/x/prometheusx"
2221
)
2322

2423
func TestPublicHealthHandler(t *testing.T) {
@@ -73,7 +72,7 @@ func TestPublicHealthHandler(t *testing.T) {
7372
t.Run(tc.name, func(t *testing.T) {
7473
reg := testhelpers.NewRegistryMemory(t, driver.WithConfigOptions(configx.WithValues(tc.config)))
7574

76-
public := x.NewRouterPublic(negroni.HandlerFunc(func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) { next(w, r) }))
75+
public := x.NewRouterPublic(prometheusx.NewMetricsManager("", "", "", ""))
7776
reg.RegisterPublicRoutes(ctx, public)
7877

7978
ts := httptest.NewServer(public)

jwk/handler_test.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,25 @@ import (
1010
"net/http/httptest"
1111
"testing"
1212

13-
"github.com/urfave/negroni"
14-
15-
"github.com/ory/hydra/v2/driver"
16-
1713
"github.com/go-jose/go-jose/v3"
1814
"github.com/stretchr/testify/assert"
1915
"github.com/stretchr/testify/require"
2016

17+
"github.com/ory/hydra/v2/driver"
2118
"github.com/ory/hydra/v2/driver/config"
2219
"github.com/ory/hydra/v2/internal/testhelpers"
2320
"github.com/ory/hydra/v2/jwk"
2421
"github.com/ory/hydra/v2/x"
2522
"github.com/ory/x/configx"
23+
"github.com/ory/x/prometheusx"
2624
"github.com/ory/x/urlx"
2725
)
2826

2927
func TestHandlerWellKnown(t *testing.T) {
3028
t.Parallel()
3129

3230
reg := testhelpers.NewRegistryMemory(t, driver.WithConfigOptions(configx.WithValue(config.KeyWellKnownKeys, []string{x.OpenIDConnectKeyName, x.OpenIDConnectKeyName})))
33-
router := x.NewRouterPublic(negroni.HandlerFunc(func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) { next(w, r) }))
31+
router := x.NewRouterPublic(prometheusx.NewMetricsManager("", "", "", ""))
3432
h := jwk.NewHandler(reg)
3533
h.SetPublicRoutes(router, func(h http.Handler) http.Handler {
3634
return h

0 commit comments

Comments
 (0)