You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-12-06 22:40:58 +03:00
Use OTEL semantic conventions constants for most attributes
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use opentelemetry_semantic_conventions::trace::DB_STATEMENT;
|
||||
use tracing::Span;
|
||||
|
||||
/// An extension trait for [`sqlx::Execute`] that records the SQL statement as
|
||||
@@ -34,7 +35,7 @@ where
|
||||
DB: sqlx::Database,
|
||||
{
|
||||
fn record(self, span: &Span) -> Self {
|
||||
span.record("db.statement", self.sql());
|
||||
span.record(DB_STATEMENT, self.sql());
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user