Change logs for SaveRow. Do not use database semconv with Uptrace
This commit is contained in:
parent
85d358da90
commit
b61bdcf676
7
save.go
7
save.go
|
@ -13,7 +13,6 @@ import (
|
||||||
"go.opentelemetry.io/otel"
|
"go.opentelemetry.io/otel"
|
||||||
"go.opentelemetry.io/otel/attribute"
|
"go.opentelemetry.io/otel/attribute"
|
||||||
"go.opentelemetry.io/otel/codes"
|
"go.opentelemetry.io/otel/codes"
|
||||||
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
|
|
||||||
"go.opentelemetry.io/otel/trace"
|
"go.opentelemetry.io/otel/trace"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -85,8 +84,10 @@ func SaveRow(ctx context.Context, db *db.DBC, dataItem meta.IMetaStruct) error {
|
||||||
sqlSmt := createInsertSQLForFields(ctx, tableName, fields, 1 /*one_row*/)
|
sqlSmt := createInsertSQLForFields(ctx, tableName, fields, 1 /*one_row*/)
|
||||||
|
|
||||||
span.SetAttributes(
|
span.SetAttributes(
|
||||||
semconv.DBSQLTableKey.String(tableName),
|
attribute.String("table", tableName),
|
||||||
semconv.DBStatementKey.String(sqlSmt),
|
attribute.String("sql", sqlSmt),
|
||||||
|
//semconv.DBSQLTableKey.String(tableName),
|
||||||
|
//semconv.DBStatementKey.String(sqlSmt),
|
||||||
)
|
)
|
||||||
|
|
||||||
updateBuilder := db.UpdateBySQL(sqlSmt, params...)
|
updateBuilder := db.UpdateBySQL(sqlSmt, params...)
|
||||||
|
|
Loading…
Reference in New Issue