constants.py 623 B

1234567891011121314151617181920212223242526
  1. from opentelemetry.semconv.trace import SpanAttributes as _SpanAttributes
  2. # Span Tags
  3. SPAN_DB_TYPE = "mysql"
  4. SPAN_REDIS_TYPE = "redis"
  5. SPAN_DURATION = "duration"
  6. SPAN_SQL_STR = "sql"
  7. SPAN_SQL_EXPLAIN = "explain"
  8. SPAN_ERROR_TYPE = "error"
  9. class SpanAttributes(_SpanAttributes):
  10. """
  11. Span Attributes
  12. """
  13. DB_INSTANCE = "db.instance"
  14. DB_TYPE = "db.type"
  15. DB_IP = "db.ip"
  16. DB_PORT = "db.port"
  17. ERROR_KIND = "error.kind"
  18. ERROR_OBJECT = "error.object"
  19. ERROR_MESSAGE = "error.message"
  20. RESULT_CODE = "result.code"
  21. RESULT_MESSAGE = "result.message"
  22. RESULT_ERRORS = "result.errors"