Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #643 +/- ##
=======================================
+ Coverage 85.6% 85.7% +0.1%
=======================================
Files 15 15
Lines 697 690 -7
=======================================
- Hits 597 592 -5
+ Misses 74 73 -1
+ Partials 26 25 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
How about removing this check in this PR? if value == "" {
return semconv.ErrorTypeOther
}Since, as far as I can tell, it's unreachable. |
|
Hey @gaiaz-iusipov, thanks for the PR. Could you please post your |
Signed-off-by: Gaiaz Iusipov <[email protected]>
Signed-off-by: Gaiaz Iusipov <[email protected]>
|
@XSAM I added the benchmark and also fixed the changelog, since an entry was added to the wrong section today. |
There was a problem hiding this comment.
Pull request overview
Optimizes error metric attribute creation by eliminating an intermediate slice allocation.
Changes:
- Return a single error-type attribute and append it directly.
- Add benchmark coverage for error recording.
- Update tests and unreleased changelog entries.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
utils.go |
Appends the error attribute directly. |
utils_bench_test.go |
Benchmarks error metric recording. |
internal/semconv/attributes.go |
Replaces slice-returning error conversion. |
internal/semconv/attributes_test.go |
Updates tests for the singular attribute API. |
CHANGELOG.md |
Documents the optimization and corrects release placement. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
XSAM
left a comment
There was a problem hiding this comment.
LGTM. @gaiaz-iusipov, thanks for your contribution!
This release is the last to support [Go 1.25]. The next release will require at least [Go 1.26]. ### Added - Support testing of [Go 1.27]. (#650) - Add `WithSpanErrorAttributesGetter` option to set additional attributes (e.g., `db.response.status_code`) on spans when an operation returns an error. (#651) - Add `SpanOptions.RowsChildOfQuery` to create `sql.rows` spans as children of the `sql.conn.query` or `sql.stmt.query` span that produced them, so concurrent queries can be correlated with their result iteration. (#652) - Support `driver.RowsColumnScanner` on [Go 1.27]. (#649) ### Changed - Replace `ErrorTypeAttributes` with `ErrorTypeAttribute` to avoid allocating an additional slice. (#643) - Upgrade OTel to `v1.46.0`. (#644) ### Fixed - `db.client.operation.duration` histogram now uses the explicit bucket boundaries recommended by the OTel Semantic Conventions (`0.001` to `10` seconds) instead of the SDK defaults, which placed virtually all database operations in the first bucket. (#632) [Go 1.26]: https://go.dev/doc/go1.26 [Go 1.25]: https://go.dev/doc/go1.25 [Go 1.27]: https://go.dev/doc/go1.27
Resolve conflicts with XSAM#643, XSAM#649, XSAM#651 and XSAM#652: - recordSpanError takes *config (needed for SpanErrorAttributesGetter) - otRows keeps pointer receivers and durationMetric, wrapped by wrapRowsColumnScanner - durationMetric uses ErrorTypeAttribute instead of ErrorTypeAttributes Co-Authored-By: Claude Fable 5.2 <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.