Skip to content

Commit

Permalink
update span name
Browse files Browse the repository at this point in the history
Signed-off-by: Jared Tan <jian.tan@daocloud.io>
  • Loading branch information
JaredTan95 committed Aug 25, 2024
1 parent 14c3069 commit 03684b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion connector/slowsqlconnector/connector_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,11 @@ func (c *logsConnector) attrToLogRecord(sl plog.ScopeLogs, serviceName string, s
spanAttrs.CopyTo(logRecord.Attributes())

// Add common attributes to the log record.
logRecord.Attributes().PutStr(spanNameKey, span.Name())
logRecord.Attributes().PutStr(spanKindKey, traceutil.SpanKindStr(span.Kind()))
logRecord.Attributes().PutStr(statusCodeKey, traceutil.StatusCodeStr(span.Status().Code()))
logRecord.Attributes().PutStr(serviceNameKey, serviceName)
logRecord.Attributes().PutStr(dbStatementKey, serviceName)
logRecord.Attributes().PutStr(dbStatementKey, getValue(spanAttrs, dbStatementKey))
logRecord.Attributes().PutDouble(statementExecDuration, spanDuration(span)) // seconds

// Add configured dimension attributes to the log record.
Expand Down

0 comments on commit 03684b3

Please sign in to comment.