Skip to content

Commit 17a4c4f

Browse files
alnrory-bot
authored andcommitted
feat(changelog-oel): improved tracing and metrics for the high-performance SQL connection pool
GitOrigin-RevId: 9480f8997f7641b0f1276ca2ae0f25781428fdbc
1 parent c8a1e28 commit 17a4c4f

6 files changed

Lines changed: 44 additions & 266 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 156 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-09-08)](#000-2025-09-08)
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-09-08)
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,26 +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-
* Escape IPv6 regex string ([0ba326a](https://github.com/ory/hydra/commit/0ba326ad59ab227bc6e9f47a846fbf1ac75c0f1c)):
100-
101-
GitOrigin-RevId: cf04d7cae93aea32950a149527e2b1319af97b39
102-
103-
* Failing CI in OSS repos ([c900985](https://github.com/ory/hydra/commit/c9009858dc96edbbec1dd256cb1a734beb4f90aa)):
104-
105-
GitOrigin-RevId: 3d1f84b0f0d006971aea9489322b3e0f32a6a7e3
106-
107-
* Fix expires_at timestamp not in UTC leading to local test failures ([337000a](https://github.com/ory/hydra/commit/337000aacd07a1af6e77918a011903b6f39701a3)):
108-
109-
GitOrigin-RevId: 560d958391b12ace6db9d4c05074719e96e0329e
110-
11183
* 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):
11284

11385
<!--
@@ -121,38 +93,14 @@ If this pull request
12193

12294
```
12395

124-
* Hydra tracing ([38ee050](https://github.com/ory/hydra/commit/38ee050214499aa96b06dd6b0eb8d18ead9dcd32)):
125-
126-
GitOrigin-RevId: 44aeb79002934149b6889c4e13697aa178f3d614
127-
128-
* **hydra:** Instrument metrics also on public endpoints ([8aee364](https://github.com/ory/hydra/commit/8aee364805a0fa20cd5d786324efb5c6e5cdfcb5)):
129-
130-
GitOrigin-RevId: 84ae1df26bd3d9a025655e50792ea7312f250cca
131-
132-
* **hydra:** Use prometheus metrics instead of SQA metrics ([7a6592e](https://github.com/ory/hydra/commit/7a6592e10fc5cd1b00d9bc12ab8c027c4e967293)):
133-
134-
GitOrigin-RevId: 2ca878d66e4ab101af51bc32f8606ce6c3af0587
135-
136-
* Identity queries ([a30f021](https://github.com/ory/hydra/commit/a30f021fd98969c2dbc31a4dc3e45365d60c1a25)):
137-
138-
GitOrigin-RevId: b103d25a807c643b521a12d593486d5125f390be
139-
14096
* Ignore flaky keys in Hydra HSM tests ([469b2ad](https://github.com/ory/hydra/commit/469b2ad538865a38738a10f46d270f53d12101ad)):
14197

14298
GitOrigin-RevId: 83312e6544bc33ccc30e1e1e414cc04910429192
14399

144-
* Include go.mod in vendored oryx ([08a3ab4](https://github.com/ory/hydra/commit/08a3ab43ddb1e2a0df430224f969fe3f0ba161bf)):
145-
146-
GitOrigin-RevId: 20365bbe6b2cf95ac7973bcca9056455d2cb3803
147-
148100
* **infrastructure:** Hydra oss CI ([e846541](https://github.com/ory/hydra/commit/e84654185cdfffbf160d5309f744795d15d723f9)):
149101

150102
GitOrigin-RevId: 3df0724e5ea4c81a0f4c481c1a3a34529356d073
151103

152-
* Jsonx.ApplyJSONPatch ([c6fa2a6](https://github.com/ory/hydra/commit/c6fa2a6f17f63e43cfecb576bd2a1c1b58c778ed)):
153-
154-
GitOrigin-RevId: 43c10801f5051e3d5fbea5f4f5e90394f6da0fbb
155-
156104
* 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)):
157105

158106
The previous link in the documentation led to a page unrelated to JWT.
@@ -180,23 +128,7 @@ If this pull request
180128
persistence/sql/src/20220210000001_nid/20220210000001000000_nid.cockroach.up.sql
181129
```
182130

183-
* Otlp sampling rate default ([cbd5094](https://github.com/ory/hydra/commit/cbd50947ff7e03a4c32d0ad52acd55b595b393ce)):
184-
185-
GitOrigin-RevId: 8a01bded7d8eca0ac3a81de793286144aab16426
186-
187-
* Print correct content of down migrations ([4a4a088](https://github.com/ory/hydra/commit/4a4a0880dc6222870b1e177ce04f81842359f922)):
188-
189-
GitOrigin-RevId: 48b1efa8d3d4f6c6648d3941f67f622fdfb0075c
190-
191-
* Revert "fix: otlp sampling rate default ([#9055](https://github.com/ory/hydra/issues/9055))" ([02e86bc](https://github.com/ory/hydra/commit/02e86bc192c8f693c23aa430481a1e719d8e2e21)):
192-
193-
GitOrigin-RevId: 9de37a48b68c7ee29caefb01c83f1a78999dc15b
194-
195131
* 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)
196-
* Routes in AX with identity_schema ([5014348](https://github.com/ory/hydra/commit/50143483fd66fb7d545e8a8e2c7e95857f35fbbb)):
197-
198-
GitOrigin-RevId: ab72dc64c194c06bf0301e87aa829c72022ac41e
199-
200132
* Simplify and fix Copybara sync job ([f998d09](https://github.com/ory/hydra/commit/f998d090ca6408b05524aea5e5f3a79c5d44b1a4)):
201133

202134
GitOrigin-RevId: 115f1ba1aa8f92d9c546046b37d4fb27dacedec8
@@ -213,14 +145,6 @@ If this pull request
213145

214146
GitOrigin-RevId: 64950988a466bbdb4f25b8d9f5c416ff591c00bf
215147

216-
* Use hard-coded fallback key instead of panic ([e1f6450](https://github.com/ory/hydra/commit/e1f645012f43f62928fdc79710b45d935878367f)):
217-
218-
GitOrigin-RevId: d7a2270bbf5360288199e9632b2eac6cbc29737c
219-
220-
* Use main branch for polis ([6c24e68](https://github.com/ory/hydra/commit/6c24e68995b8eae9ba0b8872867270ef1d35113b)):
221-
222-
GitOrigin-RevId: 04533493184c6abdc3a211daffd98f6b68e1c9cc
223-
224148
* Using uuid_generate_v4 function ([#3958](https://github.com/ory/hydra/issues/3958)) ([c206066](https://github.com/ory/hydra/commit/c20606606654af975e5d82998956bb998acee576)):
225149

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

231155

232-
### Code Refactoring
233-
234-
* Move database meta functions to root x folder for reusability ([7e49133](https://github.com/ory/hydra/commit/7e49133f435d6a0f74a63e8f8d03c5d314d7d3c6)):
235-
236-
GitOrigin-RevId: 30ee938ea5f1d19bac8967e0ebfe2d595ec27d2b
237-
238-
239156
### Features
240157

241-
* Add allowed domains configuration for captcha ([df3f05c](https://github.com/ory/hydra/commit/df3f05c6ffbd3f00e62a33b2b68416ccf2009112)):
242-
243-
GitOrigin-RevId: 03395362054593f07ff6405c2a747256b5ff528e
244-
245158
* Add error reason to OAuth2TokenExchangeError event ([#3971](https://github.com/ory/hydra/issues/3971)) ([241dd45](https://github.com/ory/hydra/commit/241dd45fa17ed10d1101d890199df47dab4dbce5))
246159
* Add handler for /.well-known/oauth-authorization-server. ([#3980](https://github.com/ory/hydra/issues/3980)) ([5baca28](https://github.com/ory/hydra/commit/5baca2843a98c222006b27b20e7e6392421ecad8)):
247160

@@ -252,10 +165,6 @@ If this pull request
252165
configuration items that conform to this endpoint as seen here:
253166
https://datatracker.ietf.org/doc/html/rfc8414
254167

255-
* Autoconfigure kratos-changefeed ([d92dabe](https://github.com/ory/hydra/commit/d92dabedf2f55d8b74f5898c987c3e6712fb0b16)):
256-
257-
GitOrigin-RevId: 8e684d3c1ed528798c0c81cc4330858c54a39acf
258-
259168
* **changelog-oel:** Add `hydra debug challenge` command ([a94662f](https://github.com/ory/hydra/commit/a94662f1edc49e662a5e1818dbfd4cac15bd9ead)):
260169

261170
GitOrigin-RevId: 793cf3327696465ea89fdfcf078f26594832a666
@@ -264,22 +173,10 @@ If this pull request
264173

265174
GitOrigin-RevId: 1a115d9e2055bbf9a0bb4ecf7c6a266b2b70a8cd
266175

267-
* **changelog-oel:** Choose identity schema in self-service registration and login flows ([a398b64](https://github.com/ory/hydra/commit/a398b6444bff9476b2768e9e5f840bcf73fff3a6)):
268-
269-
GitOrigin-RevId: 8d6ee03cc8181d3277100a4b7412a3a113799964
270-
271-
* **changelog-oel:** Reduce hydra CPU and memory consumption ([018709e](https://github.com/ory/hydra/commit/018709e32ea23448d751d93cb48cb5325af76115)):
272-
273-
GitOrigin-RevId: 97616b1f6bf80f358621a85798eeb2ebba6f543a
274-
275176
* **changelog:** Graceful refresh count limit ([470713d](https://github.com/ory/hydra/commit/470713da36862745ca0222c284e0692fa40559ae)):
276177

277178
GitOrigin-RevId: 7f8bf5fee8b06490f888590054d2dcd2f1cf2cba
278179

279-
* **changelog:** Migrate http router to stdlib router ([a147e3b](https://github.com/ory/hydra/commit/a147e3b64007a3c7b2c5dd0351321c1aa92d5b70)):
280-
281-
GitOrigin-RevId: ebd7ec330a4f7b9826cb70ba36ba2f727ea64c96
282-
283180
* 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):
284181

285182
This patch introduces the OAuth 2.0 Device Authorization Grant to Ory
@@ -308,10 +205,6 @@ If this pull request
308205
implementation can be found
309206
[here](https://github.com/ory/hydra-login-consent-node/blob/99ca6ad544f64110706c289dda74c7c622ec3110/src/routes/device.ts).
310207

311-
* Improve domain telemetry for OSS (Hydra & Kratos) ([02c5757](https://github.com/ory/hydra/commit/02c575751089688dba55b58b5aec7673796b2c2a)):
312-
313-
GitOrigin-RevId: b8aebb0ad8bae28ee8295b9052b2f60603244b7e
314-
315208
* Improve oauth2 event data ([#3975](https://github.com/ory/hydra/issues/3975)) ([6da0fd3](https://github.com/ory/hydra/commit/6da0fd327e16d0bf40a5f637766a11b087e7ff1e))
316209
* Improve openapi spec ([#3908](https://github.com/ory/hydra/issues/3908)) ([4053c9e](https://github.com/ory/hydra/commit/4053c9ecc19f50a3793c595eeb3e242a47bbedf0)), closes [#1234](https://github.com/ory/hydra/issues/1234) [#1234](https://github.com/ory/hydra/issues/1234):
317210

@@ -334,10 +227,6 @@ If this pull request
334227

335228
GitOrigin-RevId: dbb48d171fad1f9b4fd31385f0ef4fb01e39e823
336229

337-
* Move config testhelpers to ory/x ([3a4ba08](https://github.com/ory/hydra/commit/3a4ba084c74cf49a521856f150a8a2c6f3c1aa25)):
338-
339-
GitOrigin-RevId: fd484445e9715760231f7f86ec212d094e826377
340-
341230
* Revoke Kratos session asynchronously ([#3936](https://github.com/ory/hydra/issues/3936)) ([a0e7ee2](https://github.com/ory/hydra/commit/a0e7ee29298d4f882a7d471e0601b01c6848c40d)):
342231

343232
This change makes the session revocation in Kratos async to improve
@@ -417,18 +306,10 @@ If this pull request
417306
POST admin/oauth2/auth/sessions/consent?consent_challenge_id=G_TIM3XABG14UwIgDoT1DRfipjhC1uix
418307
```
419308

420-
* Use stdlib HTTP router in Kratos ([8f81931](https://github.com/ory/hydra/commit/8f8193179a39dc142d502fbc559891ffa0385ed8)):
421-
422-
GitOrigin-RevId: 799513e99acbf43a05fe3113ffda45d2fff2a9e0
423-
424309
* Use vendored jackson ([a0a9062](https://github.com/ory/hydra/commit/a0a906211bce4ced3e1f4324eb9d287ef10892a6)):
425310

426311
GitOrigin-RevId: 591238768218ba2b5af93f91ac7e16f4c170da5b
427312

428-
* Use vendored ory/x ([6581e01](https://github.com/ory/hydra/commit/6581e01679b2e146433061cbaaebb80a0e3905b5)):
429-
430-
GitOrigin-RevId: 994f3b754946ca5b2bd1bab0fe20532f5d5ab62f
431-
432313

433314
### Performance Improvements
434315

@@ -439,43 +320,8 @@ If this pull request
439320

440321
### Tests
441322

442-
* Add golangci-lint config and GHA ([1209de7](https://github.com/ory/hydra/commit/1209de78736c6730fa84cbf4e7046535aeba094f)):
443-
444-
GitOrigin-RevId: eb14c9f38e2b98d11a78ee0b90fd8f4f689abd3d
445-
446-
* **hydra:** Add snapshots for login & consent requests ([687cfae](https://github.com/ory/hydra/commit/687cfae2092b90bcde11b0976b3f944bc8bb9a4a)):
447-
448-
GitOrigin-RevId: 47d041cf207af6c3e9e21bf3016e5ea0cf044344
449-
450-
* **hydra:** Clean oauth2 session setup ([699e382](https://github.com/ory/hydra/commit/699e38238220f857148b503dfb96d9b057bb4583)):
451-
452-
GitOrigin-RevId: e05097c7439096cf40fdcf059b3396970b2f1219
453-
454-
* **hydra:** Clean up some helpers ([7840b0e](https://github.com/ory/hydra/commit/7840b0e0aade3b8fac6f1677a75b192e9c094b23)):
455-
456-
GitOrigin-RevId: 2b93dfbc4c27602a6ad053ccd0f25962f600419f
457-
458-
* **hydra:** Convert custom JWT claim tests to table ([8391d1b](https://github.com/ory/hydra/commit/8391d1bc57a85420f50c2e0b856a509b6784963d)):
459-
460-
GitOrigin-RevId: c0114d299bdec370104e8ad0b3042d3a3c045bb1
461-
462-
* **hydra:** New and better e2e go tests ([aefe5e2](https://github.com/ory/hydra/commit/aefe5e2663608ec945dc49be466d48c0d43810f2)):
463-
464-
GitOrigin-RevId: 23a73e451286556fb6b0072c5b348eee137f1310
465-
466-
* **hydra:** Refactor consent handler tests ([4d61925](https://github.com/ory/hydra/commit/4d6192599dc4f1020e8c5418398c6a85820c74cb)):
467-
468-
GitOrigin-RevId: 77753f8e0018eaef2bc17b73d456de5b7b0585b1
469-
470323
* Parallelize and improve ([#3989](https://github.com/ory/hydra/issues/3989)) ([a47e395](https://github.com/ory/hydra/commit/a47e39513f1f08076849f77517977abffa195364))
471324

472-
### Unclassified
473-
474-
* Merge 3834fab8c161a7dc98d43f32acf8efd9e6e95352 into 4dae0f4a8785eb36d8dbb27137f6b924c1e0f0b5 ([dc84053](https://github.com/ory/hydra/commit/dc840535c19d58caf130966e00d3d2fe9f3eb577)):
475-
476-
GitOrigin-RevId: 0c2dcaa065b64d2aafbcfd49c79363a214c5b2aa
477-
478-
479325

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

driver/registry_sql.go

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"github.com/gorilla/sessions"
1818
"github.com/hashicorp/go-retryablehttp"
1919
_ "github.com/jackc/pgx/v5/stdlib"
20-
"github.com/luna-duclos/instrumentedsql"
2120
"github.com/pkg/errors"
2221
"github.com/prometheus/client_golang/prometheus/promhttp"
2322
"github.com/rs/cors"
@@ -52,7 +51,6 @@ import (
5251
"github.com/ory/x/httpx"
5352
"github.com/ory/x/logrusx"
5453
"github.com/ory/x/otelx"
55-
otelsql "github.com/ory/x/otelx/sql"
5654
"github.com/ory/x/popx"
5755
prometheus "github.com/ory/x/prometheusx"
5856
"github.com/ory/x/resilience"
@@ -119,15 +117,6 @@ func (m *RegistrySQL) Init(
119117
goMigrations []popx.Migration,
120118
) error {
121119
if m.persister == nil {
122-
var opts []instrumentedsql.Opt
123-
if m.Tracer(ctx).IsLoaded() {
124-
opts = []instrumentedsql.Opt{
125-
instrumentedsql.WithTracer(otelsql.NewTracer()),
126-
instrumentedsql.WithOmitArgs(), // don't risk leaking PII or secrets
127-
instrumentedsql.WithOpsExcluded(instrumentedsql.OpSQLRowsNext),
128-
}
129-
}
130-
131120
if m.Config().CGroupsV1AutoMaxProcsEnabled() {
132121
_, err := maxprocs.Set(maxprocs.Logger(m.Logger().Infof))
133122
if err != nil {
@@ -141,14 +130,13 @@ func (m *RegistrySQL) Init(
141130
)
142131
c, err := pop.NewConnection(
143132
&pop.ConnectionDetails{
144-
URL: sqlcon.FinalizeDSN(m.l, cleanedDSN),
145-
IdlePool: idlePool,
146-
ConnMaxLifetime: connMaxLifetime,
147-
ConnMaxIdleTime: connMaxIdleTime,
148-
Pool: pool,
149-
UseInstrumentedDriver: m.Tracer(ctx).IsLoaded(),
150-
InstrumentedDriverOptions: opts,
151-
Unsafe: m.Config().DbIgnoreUnknownTableColumns(),
133+
URL: sqlcon.FinalizeDSN(m.l, cleanedDSN),
134+
IdlePool: idlePool,
135+
ConnMaxLifetime: connMaxLifetime,
136+
ConnMaxIdleTime: connMaxIdleTime,
137+
Pool: pool,
138+
TracerProvider: m.Tracer(ctx).Provider(),
139+
Unsafe: m.Config().DbIgnoreUnknownTableColumns(),
152140
},
153141
)
154142
if err != nil {

0 commit comments

Comments
 (0)