Skip to content

Commit

Permalink
Merge pull request #571 from xhdnoah/master
Browse files Browse the repository at this point in the history
feat: config DisableErrSkip
  • Loading branch information
nicholasxuu authored Jul 23, 2024
2 parents b52089a + 3f659cc commit 1e8217c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.2.2 (2024-7-23)

- 对 otelsql 设置 `DisableErrSkip: true` 以忽略 ErrSkip

# 1.2.1 (2024-5-17)

- 新增 ISeqRedis 抽象执行 Lua 脚本,隐藏 go-redis 版本差异
Expand Down
1 change: 1 addition & 0 deletions extensions/entext/ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func (d *EntExt) Init(app *gobay.Application) error {
if app.Config().GetBool("otel_enable") {
db, err = otelsql.Open(dbDriver, dbURL,
otelsql.WithSpanOptions(otelsql.SpanOptions{
DisableErrSkip: true,
SpanFilter: func(ctx context.Context, method otelsql.Method, query string, args []driver.NamedValue) bool {
return trace.SpanContextFromContext(ctx).IsValid()
}}),
Expand Down

0 comments on commit 1e8217c

Please sign in to comment.