Releases: XSAM/otelsql
Release v0.41.0
⚠️ Notice ⚠️
This release contains breaking changes:
RegisterDBStatsMetricsnow returns(metric.Registration, error)(previously returned onlyerror) so callers canUnregister()the callback and avoid memory leaks.- If you need to unregister:
reg, err := RegisterDBStatsMetrics(...)+defer reg.Unregister(). - If you do not need to unregister:
_, err := RegisterDBStatsMetrics(...).
- If you need to unregister:
WithAttributesnow appends attributes when specified multiple times (previously overwrote existing attributes).- If you relied on overwriting: consolidate your attributes into a single
WithAttributes(...)call.
- If you relied on overwriting: consolidate your attributes into a single
Added
WithTextMapPropagatorallows customization of the OTel text map propagator used by SQLCommenter. (#540)
This is an experimental feature and may be changed or removed in a later release.
Removed
Changed
- Reduce allocations and improve performance when creating spans. (#549)
- Reduce allocations when recording metrics. (#550)
RegisterDBStatsMetricsnow returns ametric.Registrationso callbacks can be unregistered. (#580)WithAttributesnow accumulates attributes across multiple calls instead of overwriting. (#576)- Upgrade OTel to
v1.39.0. (#583)
What's Changed
- Update actions/checkout action to v5 by @renovate[bot] in #523
- Update golang Docker tag to v1.25 by @renovate[bot] in #522
- Drop support for Go 1.23 by @XSAM in #533
- Update golang.org/x by @renovate[bot] in #531
- Update module golang.org/x/net to v0.44.0 by @renovate[bot] in #536
- Improve createSpan performance by @boekkooi-impossiblecloud in #549
- Reduce recordMetric allocations by @boekkooi-impossiblecloud in #550
- Update actions/cache action to v4.3.0 by @renovate[bot] in #544
- Update module github.com/golangci/golangci-lint/v2 to v2.6.0 by @renovate[bot] in #541
- add linter wsl_v5 by @christiandins in #551
- Update golang.org/x by @renovate[bot] in #552
- Update module github.com/golangci/golangci-lint/v2 to v2.6.1 by @renovate[bot] in #559
- Update actions/upload-artifact action to v5 by @renovate[bot] in #555
- Update module go.opentelemetry.io/auto/sdk to v1.2.1 by @renovate[bot] in #538
- Update golang.org/x by @renovate[bot] in #563
- Update actions/checkout action to v6 by @renovate[bot] in #569
- Allow configuring a TextMapPropagator for SQLCommenter by @simonbos in #540
- Update module github.com/golangci/golangci-lint/v2 to v2.7.2 by @renovate[bot] in #564
- Disable renovate update except otel libraries for example folder by @XSAM in #582
- Update actions/checkout action to v6.0.1 by @renovate[bot] in #575
- Migrate Renovate config by @renovate[bot] in #584
- Carify comments for DisableSkipErrMeasurement by @XSAM in #585
- Update codecov/codecov-action action to v5.5.2 by @renovate[bot] in #578
- Update actions/setup-go action to v6.1.0 by @renovate[bot] in #568
- Update actions/cache action to v5 by @renovate[bot] in #586
RegisterDBStatsMetricsnow returns ametric.Registrationfor unregister by @XSAM in #588- Update actions/upload-artifact action to v6 by @renovate[bot] in #587
- Update opentelemetry-go monorepo by @renovate[bot] in #583
- Change WithAttributes to append instead of replace attributes by @dzakaammar in #576
- Release v0.41.0 by @XSAM in #590
New Contributors
- @boekkooi-impossiblecloud made their first contribution in #549
- @christiandins made their first contribution in #551
- @simonbos made their first contribution in #540
- @dzakaammar made their first contribution in #576
Full Changelog: v0.40.0...v0.41.0
Release v0.40.0
This release is the last to support Go 1.23.
The next release will require at least Go 1.24.
Added
Changed
- Upgrade OTel to
v1.38.0/v0.60.0. (#510)
What's Changed
- Update module github.com/XSAM/otelsql to v0.39.0 by @renovate[bot] in #506
- Update examples by @renovate[bot] in #493
- Update module github.com/golangci/golangci-lint/v2 to v2.2.1 by @renovate[bot] in #511
- Update opentelemetry-go monorepo by @renovate[bot] in #510
- Support Go 1.25 by @XSAM in #517
- Upgrade golangci-lint to v2.4.0 by @XSAM in #518
- Update actions/cache action to v4.2.4 by @renovate[bot] in #515
- Update codecov/codecov-action action to v5.5.1 by @renovate[bot] in #521
- Update actions/checkout action to v4.3.0 by @renovate[bot] in #520
- Disable non-OpenTelemetry dependency updates for examples by @XSAM in #519
- Update actions/setup-go action to v6 by @renovate[bot] in #524
- Fix renovate config by @XSAM in #526
- Migrate renovate config by @renovate[bot] in #529
- Release v0.40.0 by @XSAM in #532
Full Changelog: v0.39.0...v0.40.0
Release v0.39.0
Warning
The new introduced OTEL_SEMCONV_STABILITY_OPT_IN environment variable will be supported for at least six months from this release. After this period, support for legacy metrics and Semantic Conventions v1.24.0 may be removed in the next release.
You can start the migration to the new Semantic Conventions v1.30.0 by setting the OTEL_SEMCONV_STABILITY_OPT_IN=database/dup or OTEL_SEMCONV_STABILITY_OPT_IN=database environment variable in your application.
See also the Semantic conventions for database client metrics.
Added
-
Support to emit query related attributes for the v1.24.0 and v1.30.0 semantic conventions based on the value of the
OTEL_SEMCONV_STABILITY_OPT_INenvironment variable. (#478)database/dup: Emit bothdb.statementanddb.query.textattributes.database: Emitdb.query.textattribute.- by default: Emit
db.statementattribute.
-
New
db.client.operation.durationmetric following OpenTelemetry semantic conventions. (#480) -
Support for configuring metrics behavior based on
OTEL_SEMCONV_STABILITY_OPT_INsetting. (#480)database/dup: Emit both legacy latency and new durationdb.client.operation.durationmetrics.database: Emit new durationdb.client.operation.durationmetric.- by default: Emit only the legacy latency metric.
Changed
- Upgrade semantic conventions to
semconv/v1.30.0. (#478) - Improve memory usage when recording metrics or creating spans. (#497)
- Upgrade OTel to
v1.36.0/v0.58.0. (#495)
Fixed
- Data race issues when recording metrics or creating spans. (#497)
What's Changed
- Update module github.com/XSAM/otelsql to v0.38.0 by @renovate in #458
- Update module golang.org/x/net to v0.38.0 by @renovate in #459
- Fix renovate for example by @XSAM in #460
- Update module github.com/cenkalti/backoff/v4 to v5 by @renovate in #463
- Fix example dependency by @XSAM in #465
- Update examples by @renovate in #461
- Update examples by @renovate in #470
- Update examples by @renovate in #474
- Update codecov/codecov-action action to v5.4.2 by @renovate in #476
- Update module golang.org/x/sys to v0.32.0 by @renovate in #471
- Migrate
db.statementtodb.query.textby @XSAM in #478 - Migrate
db.sql.latencymetric todb.client.operation.durationby @XSAM in #480 - Update semantic convention migration doc by @XSAM in #481
- Enable helpers:pinGitHubActionDigestsToSemver by @XSAM in #483
- Update actions/cache action to v4.2.3 by @renovate in #485
- Update actions/setup-go action to v5.4.0 by @renovate in #487
- Update module github.com/golangci/golangci-lint to v2 by @renovate in #451
- Use read-only permissions for CI by @XSAM in #490
- Update golang:1.24-alpine Docker digest to ef18ee7 by @renovate in #469
- Update actions/setup-go action to v5.5.0 by @renovate in #491
- Update examples by @renovate in #477
- Update module github.com/golangci/golangci-lint/v2 to v2.1.6 by @renovate in #489
- Update actions/upload-artifact action to v4.6.2 by @renovate in #488
- Update actions/checkout action to v4.2.2 by @renovate in #486
- Update golang.org/x by @renovate in #492
- Update module github.com/prometheus/client_golang to v1.22.0 by @renovate in #473
- Update module google.golang.org/grpc to v1.72.1 by @renovate in #467
- Update codecov/codecov-action action to v5.4.3 by @renovate in #494
- Fix data race when recording metrics and spans by @XSAM in #497
- Update googleapis to 55703ea by @renovate in #484
- Update opentelemetry-go monorepo by @renovate in #495
- Release v0.39.0 by @XSAM in #504
Full Changelog: v0.38.0...v0.39.0
Release v0.38.0
Added
WithInstrumentErrorAttributesGetteroption to provide additional error-related attributes. (#440)
Changed
- Upgrade OTel to
v1.35.0/v0.57.0. (#437)
Removed
- Drop support for Go
1.22. (#447)
What's Changed
- Update module github.com/XSAM/otelsql to v0.37.0 by @renovate in #424
- Update module github.com/prometheus/client_golang to v1.21.0 by @renovate in #426
- Update module github.com/go-sql-driver/mysql to v1.9.0 by @renovate in #425
- Update codecov/codecov-action action to v5.4.0 by @renovate in #429
- Update module github.com/prometheus/client_golang to v1.21.1 by @renovate in #432
- Update module google.golang.org/grpc to v1.71.0 by @renovate in #434
- Update otel/opentelemetry-collector-contrib Docker tag to v0.121.0 by @renovate in #428
- Group golang.org/x dependencies updates into one PR by @XSAM in #441
- Pin dependencies by @renovate in #442
- Update module github.com/prometheus/procfs to v0.16.0 by @renovate in #445
- Drop support for Go 1.22 by @XSAM in #447
- Update golang.org/x by @renovate in #444
- Update module golang.org/x/net to v0.36.0 [SECURITY] by @renovate in #448
- Update module golang.org/x/net to v0.37.0 by @renovate in #449
- Update module github.com/go-sql-driver/mysql to v1.9.1 by @renovate in #443
- Add error attribute to metrics labels by @jedrivisser in #440
- Update opentelemetry-go monorepo by @renovate in #437
- Group dependencies for examples in one PR by @XSAM in #453
- Update module github.com/golangci/golangci-lint to v1.64.8 by @renovate in #430
- Slow update frequency of googleapis to once a month by @XSAM in #454
- Fix renovate cron schedule by @XSAM in #456
- Release v0.38.0 by @XSAM in #457
New Contributors
- @jedrivisser made their first contribution in #440
Full Changelog: v0.37.0...v0.38.0
Release v0.37.0
Added
AttributesFromDSNmethod to generateserver.addressandserver.portattributes from a DSN. (#419)- Go 1.24 to supported versions. (#422)
Changed
- Upgrade OTel to
v1.34.0/v0.56.0. (#412) - Update the comment for the
WithAttributesoption to correctly describe the behavior on measurement creation. (#413) - Upgrade semantic conventions to
semconv/v1.24.0. (#418)
What's Changed
- Update codecov/codecov-action action to v5.1.2 by @renovate in #400
- Update codecov/codecov-action action to v5.3.1 by @renovate in #407
- Update module github.com/XSAM/otelsql to v0.36.0 by @renovate in #403
- Update module github.com/klauspost/compress to v1.17.11 by @renovate in #373
- Update module github.com/golangci/golangci-lint to v1.63.4 by @renovate in #406
- Update module google.golang.org/grpc to v1.70.0 by @renovate in #381
- Update module go.opentelemetry.io/proto/otlp to v1.5.0 by @renovate in #409
- Update module golang.org/x/net to v0.34.0 by @renovate in #410
- Update opentelemetry-go monorepo by @renovate in #412
- Update comment of
WithAttributesand configAttributesby @XSAM in #413 - Update CHANGELOG by @XSAM in #414
- Upgrade semantic conventions to
semconv/v1.24.0by @XSAM in #418 - Add AttributesFromDSN method by @XSAM in #419
- Update module golang.org/x/net to v0.35.0 by @renovate in #416
- Update golang Docker tag to v1.24 by @renovate in #420
- Update otel/opentelemetry-collector-contrib Docker tag to v0.119.0 by @renovate in #357
- Update module github.com/grpc-ecosystem/grpc-gateway/v2 to v2.26.1 by @renovate in #405
- Update module github.com/prometheus/common to v0.62.0 by @renovate in #408
- Update module golang.org/x/sys to v0.30.0 by @renovate in #411
- Update module google.golang.org/protobuf to v1.36.5 by @renovate in #387
- Add support for Go 1.24 by @XSAM in #422
- Release v0.37.0 by @XSAM in #423
Full Changelog: v0.36.0...v0.37.0
Release v0.36.0
Added
DisableSkipErrMeasurementoption suppressesdriver.ErrSkipas an error status in measurements if enabled. (#389)
Changed
- Upgrade OTel to
v1.33.0/v0.55.0. (#396)
What's Changed
- Update module github.com/XSAM/otelsql to v0.35.0 by @renovate in #376
- Update module golang.org/x/text to v0.20.0 by @renovate in #383
- Update module golang.org/x/sys to v0.27.0 by @renovate in #382
- Update module github.com/golangci/golangci-lint to v1.62.2 by @renovate in #384
- Update otel collector config to make it clear by @XSAM in #392
- Add DisableSkipErrMetrics to disable ErrSkip metrics by @ncthompson in #389
- Update prom/prometheus Docker tag to v2.55.1 by @renovate in #378
- Fix CI cache issue by @XSAM in #395
- Upgrade OTel to version
v1.33.0/v0.55.0by @XSAM in #396 - Update codecov/codecov-action action to v5 by @renovate in #397
- Update module golang.org/x/net to v0.33.0 [SECURITY] by @renovate in #401
- Release v0.36.0 by @XSAM in #402
New Contributors
- @ncthompson made their first contribution in #389
Full Changelog: v0.35.0...v0.36.0
Release v0.35.0
Changed
- Upgrade OTel to version
v1.31.0/v0.53.0. (#374)
What's Changed
- Update module github.com/XSAM/otelsql to v0.34.0 by @renovate in #363
- Update module github.com/klauspost/compress to v1.17.10 by @renovate in #365
- Update codecov/codecov-action action to v4.6.0 by @renovate in #368
- Update module golang.org/x/sys to v0.26.0 by @renovate in #371
- Update module golang.org/x/net to v0.30.0 by @renovate in #370
- Update module google.golang.org/protobuf to v1.35.1 by @renovate in #372
- Update opentelemetry-go monorepo by @renovate in #374
- Release v0.35.0 by @XSAM in #375
Full Changelog: v0.34.0...v0.35.0
Release v0.34.0
The minimum supported Go version is 1.22.
Added
- Go
1.23to supported versions. (#361)
Changed
-
The
Openmethod uses thedataSourceNamewhen callingsql.Open. (#359)This change improves compatibility with certain drivers that perform a verification of the
dataSourceNamebefore establishing a connection. -
Upgrade OTel to version
v1.30.0/v0.52.0. (#356)
Removed
- Support for Go
1.21. (#356)