From b61bdcf676f55634bb70eb0ffe688358b2f5929b Mon Sep 17 00:00:00 2001 From: Vladislav Veselskiy Date: Tue, 12 Mar 2024 14:55:53 +0300 Subject: [PATCH] Change logs for SaveRow. Do not use database semconv with Uptrace --- save.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/save.go b/save.go index 594823e..989cdc3 100644 --- a/save.go +++ b/save.go @@ -13,7 +13,6 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" - semconv "go.opentelemetry.io/otel/semconv/v1.12.0" "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*/) span.SetAttributes( - semconv.DBSQLTableKey.String(tableName), - semconv.DBStatementKey.String(sqlSmt), + attribute.String("table", tableName), + attribute.String("sql", sqlSmt), + //semconv.DBSQLTableKey.String(tableName), + //semconv.DBStatementKey.String(sqlSmt), ) updateBuilder := db.UpdateBySQL(sqlSmt, params...)